Http\Request::getQuery

public getQuery ([mixed $name], [mixed $filters], [mixed $defaultValue], [mixed $notAllowEmpty], [mixed $noRecursive])

Gets variable from $_GET superglobal applying filters if needed If no parameters are given the $_GET superglobal is returned

// Returns value from $_GET['id'] without sanitizing
$id = $request->getQuery('id');

// Returns value from $_GET['id'] with sanitizing
$id = $request->getQuery('id', 'int');

// Returns value from $_GET['id'] with a default value
$id = $request->getQuery('id', null, 150);
doc_Phalcon
2016-10-16 09:51:09
Comments
Leave a Comment

Please login to continue.