Yaf_View_Simple::getScriptPath
(Yaf >=1.0.0)
Yaf_View_Simple::getScriptPath — 获取模板目录
参数
此函数没有参数。
返回值
以字符串形式返回模板目录;如果尚未设置,则返回 null。
示例
示例 #1 Yaf_View_Simple::getScriptPath() 示例
<?php
class IndexController extends Yaf_Controller_Abstract
{
public function indexAction()
{
/* 查找模板时使用的目录,
* 通常是 application.view.directory */
echo $this->getView()->getScriptPath();
}
}
?>以上示例的输出类似于:
/var/www/html/application/views
参见
- Yaf_View_Simple::setScriptPath() - 设置模板目录
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
