glFusion Wiki

Site Tools


glfusion:development:api:sanitize_class:setargnames

sanitize::setArgNames

(glFusion SVN)

setArgNames – Assigns logical names to query string variables

Description

setArgNames($names)

Assigns logical names to query string variables when URL rewrite is enabled.

Parameters

names

String array of names to assign to variables pulled from query string.  
The names must be passed in the order presented on the URL

Return Value

True on success otherwise false.

Example

If URL rewrite is enabled, the URL to an article would look
like this:

http://www.somesite.com/article.php/2008123323233

You would call:

$inputHandler->setArgNames (array ('story', 'mode'));

Which assigns the first parameter after article.php to story 
and the second parameter to mode.

To retrieve the value of $_GET['story'] use:

$story_id = $inputHandler->getVar('strict','story','get','');

This would return 2008123323233 as the story_id.

Notes

See Also

glfusion/development/api/sanitize_class/setargnames.txt · Last modified: 2017/04/12 21:15 (external edit)

Page Tools