Yaf_Action_Abstract::getControllerName
PHP function
Edit on GitHub ✎
(Yaf >=3.3.7)
Get controller name
Description
Yaf_Action_Abstract::getControllerName(): string|null
Returns the name of the controller that owns this action.
Parameters Parameters
Return Values
The controller name as a String, or null if it is not set.
Examples
Yaf_Action_Abstract::getControllerName example
php
<?php
class ListAction extends Yaf_Action_Abstract
{
public function execute() {
// the name of the controller that owns this action,
// e.g. "Product" for a ProductController
var_dump($this->getControllerName());
}
}
?>The above example will output something similar to:
output
string(7) "Product"See Also
Yaf_Action_Abstract::getControllerYaf_Controller_Abstract::getName