(Yaf >=3.3.7)
Yaf_Action_Abstract::getControllerName — Get controller name
Returns the name of the controller that owns this action.
この関数にはパラメータはありません。
例1 Yaf_Action_Abstract::getControllerName() example
<?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());
}
}
?>上の例の出力は、 たとえば以下のようになります。
string(7) "Product"