RequestService::GetRequest (since version 2.0)
Syntax
array GetRequest ( void )
Description
Return the current request available container and parameters.
Note:
RunRequest hast to be called before.
Note:
RunRequest hast to be called before.
Return
array Return the current request available container and parameters.
See also
Examples
<?php
// URL http://domain.com/page/index/target/user/id/10
// run the request service
RequestService::RunRequest();
// retrieve the current request parameters
$parameters = RequestService::GetRequest();
var_dump($parameters);
?>
Output:
array (6)
{
'controller' => "page",
'action' => "index",
'params' => array('target' => 'user', 'id' => 10),
'GET' => array(),
'POST' => array(),
'FILES' => array()
}
// URL http://domain.com/page/index/target/user/id/10
// run the request service
RequestService::RunRequest();
// retrieve the current request parameters
$parameters = RequestService::GetRequest();
var_dump($parameters);
?>
Output:
array (6)
{
'controller' => "page",
'action' => "index",
'params' => array('target' => 'user', 'id' => 10),
'GET' => array(),
'POST' => array(),
'FILES' => array()
}
Last change 10/16/2009