Пример #1
0
 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
0
 /**
  * Get full script path
  *
  * @param string $script
  * @return string
  */
 public function scriptPath($script)
 {
     return $this->view->getScriptPath($script);
 }
Пример #3
0
 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
0
 /**
  * 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;
 }