コード例 #1
0
ファイル: Controller.php プロジェクト: RayManOff/t4
 public final function __construct()
 {
     $this->data = new Std();
     $this->app = Application::getInstance();
     $this->view = new View('twig', $this->getTemplatePaths());
     $this->view->setController($this);
 }
コード例 #2
0
ファイル: Twig.php プロジェクト: pr-of-it/t4
 public function addTemplateRawPath($path)
 {
     parent::addTemplateRawPath($path);
     $loader = $this->twig->getLoader();
     $loader->setPaths($this->paths);
     $this->twig->setLoader($loader);
 }
コード例 #3
0
ファイル: View.php プロジェクト: pr-of-it/t4
 public function render($template, $data = [])
 {
     return $this->postProcess($this->renderer->render($template, $data));
 }
コード例 #4
0
ファイル: Twig.php プロジェクト: RayManOff/t4
 public function setView(View $view)
 {
     parent::setView($view);
     $this->links->view = $this->view;
     $this->twig->addGlobal('view', $this->links->view);
 }