Yaf_Controller_Abstract::getName
PHP function
Edit on GitHub ✎
(Yaf >=3.2.0)
Get controller name
Description
Yaf_Controller_Abstract::getName(): string|null
Returns the name of the controller.
Parameters Parameters
Return Values
The controller name as a String, or null if it is not set.
Examples
Yaf_Controller_Abstract::getName example
php
<?php
class ProductController extends Yaf_Controller_Abstract
{
public function indexAction() {
// the controller name, without the "Controller" suffix
var_dump($this->getName());
}
}
?>The above example will output something similar to:
output
string(7) "Product"See Also
Yaf_Controller_Abstract::getModuleNameYaf_Request_Abstract::getControllerName