/** * Renders template fragment in its own veriable scope. * * @param string $template * @param array $data * @return string */ public function partial($template, $data = array()) { $view = new View(); $view->setTemplatesDirectory($this->getTemplatesDirectory()); return $view->render($template, $data); }