Yaf_Controller_Abstract::getInvokeArgs
PHP function
Edit on GitHub ✎
(Yaf >=1.0.0)
Retrieve all action invocation arguments
Description
Yaf_Controller_Abstract::getInvokeArgs(): array|null
Returns all invocation arguments of the current action, as an array keyed by argument name. Invocation arguments are passed to the action through Yaf_Controller_Abstract::forward.
Parameters Parameters
Return Values
An array of invocation arguments, or null if none were given.
Examples
Yaf_Controller_Abstract::getInvokeArgs example
php
<?php
class ProductController extends Yaf_Controller_Abstract
{
public function indexAction() {
$this->forward("list", array("category" => "book", "page" => 2));
return false; // ends the current flow
}
public function listAction() {
// all invocation arguments of the current action
var_dump($this->getInvokeArgs());
}
}
?>The above example will output something similar to:
output
array(2) {
["category"]=>
string(4) "book"
["page"]=>
int(2)
}See Also
Yaf_Controller_Abstract::getInvokeArgYaf_Controller_Abstract::forward