本文整理汇总了PHP中Zend_View::getScriptPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_View::getScriptPath方法的具体用法?PHP Zend_View::getScriptPath怎么用?PHP Zend_View::getScriptPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_View
的用法示例。
在下文中一共展示了Zend_View::getScriptPath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetScriptPath
public function testGetScriptPath()
{
$view = new Zend_View();
$base = dirname(__FILE__) . '/View/_templates';
$view->setScriptPath($base);
$path = $view->getScriptPath('test.phtml');
$this->assertEquals($base . '/test.phtml', $path);
}
示例2: scriptPath
/**
* Get full script path
*
* @param string $script
* @return string
*/
public function scriptPath($script)
{
return $this->view->getScriptPath($script);
}
示例3: testGetScriptPath
public function testGetScriptPath()
{
$view = new Zend_View();
$base = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'View' . DIRECTORY_SEPARATOR . '_templates';
$view->setScriptPath($base);
$path = $view->getScriptPath('test.phtml');
$this->assertEquals($base . DIRECTORY_SEPARATOR . 'test.phtml', $path);
}
示例4: _layoutExists
/**
* Returns true if the script exists in the mail layout path.
*
* A bit of a hack, it would be nice if Zend_Layout had such a function. Candidate for ACQ_Layout...
*
* @param string $script layout script name
* @return bool true if the script exists in the path
*/
private function _layoutExists($script)
{
$dummyView = new Zend_View();
$dummyView->addScriptPath(APPLICATION_PATH . "/emails/layouts");
return $dummyView->getScriptPath($script . '.phtml') == true;
}