public function testViewrendererに追加できる() { $path = GENE_TEST_ROOT . '/library/var/view/'; $spec = ':module/:controller/:action.:suffix'; $param = array('template' => array('engine' => 'Phtml', 'path' => $path, 'spec' => $spec), 'Phtml' => array('className' => 'Zend_View', 'template' => array('suffix' => 'phtml'))); $instance = new Gene_View_Adapter($param); $renderer = new Zend_Controller_Action_Helper_ViewRenderer(); $instance->setViewRenderer($renderer); $this->assertEquals($renderer->getViewScriptPathSpec(), $spec); $this->assertEquals($renderer->getViewBasePathSpec(), $path); }
/** * Init view * * @access protected * @return Gene_Bootstrap Fluent interface */ protected function _initView() { // Load config file $path = $this->_configPath . 'view.ini'; $config = Gene_Config::load($path, $this->_cache); if (is_null($config)) { return $this; } $view = new Gene_View_Adapter($config); $renderer = new Zend_Controller_Action_Helper_ViewRenderer(); $view->setViewRenderer($renderer); return $this; }