Example #1
0
 public function testViewFactory()
 {
     $controller = new Controller();
     $view = $controller->view();
     $this->assertInstanceOf('Phifty\\View', $view);
     $view = $controller->createView();
     $this->assertInstanceOf('Phifty\\View', $view);
 }
Example #2
0
 /**
  * Render template
  *
  * @param string $template template path name.
  * @param array $args template arguments.
  * @param array $engineOptions engine options.
  */
 public function render($template, array $args = array(), array $engineOptions = array())
 {
     // merge variables
     $args = array_merge($this->vars, $args);
     // render template file
     return parent::render($template, $args, $engineOptions);
 }