(Yaf >=1.0.0)
Yaf_Request_Simple::__construct — Constructor of Yaf_Request_Simple
$method = ?,$module = ?,$controller = ?,$action = ?,$params = ?
This function is currently not documented; only its argument list is available.
This function has no parameters.
Example #1 Yaf_Request_Simple::__construct() example
<?php
/**
* In a CLI script, build a request that skips the routing
* process by giving the MVC names directly.
*/
$request = new Yaf_Request_Simple(
"CLI", // method
"Index", // module
"Product", // controller
"detail", // action
array("id" => 10) // request parameters
);
var_dump($request->isRouted()); /* requests with MVC names are pre-routed */
var_dump($request->getModuleName());
var_dump($request->getControllerName());
var_dump($request->getActionName());
var_dump($request->getParam("id"));
?>The above example will output something similar to:
bool(true) string(5) "Index" string(7) "Product" string(6) "detail" int(10)