(Yaf >=1.0.0)
Yaf_Controller_Abstract::getModuleName — 获取模块名
此函数没有参数。
模块名(string 类型),如果未设置则返回 null。
示例 #1 Yaf_Controller_Abstract::getModuleName() 示例
<?php
class IndexController extends Yaf_Controller_Abstract
{
public function indexAction() {
// 假设请求被分发到了默认的 "Index" 模块
var_dump($this->getModuleName());
}
}
?>以上示例的输出类似于:
string(5) "Index"