コード例 #1
0
 function compile(Engine $factory)
 {
     $closure = $this->func;
     $obj = new HTMLViewComponent($this->template, $closure);
     $obj->_holderName = $this->getHolderName();
     return $obj->compile();
 }
コード例 #2
0
ファイル: ViewBuilder.php プロジェクト: ryosukemiyazawa/lasa
 public function replaceSections($template)
 {
     //sectionを変換する
     $view = new HTMLViewComponent($template);
     $template = $view->compile();
     return $template;
 }
コード例 #3
0
 private function compileAnnotations(HTMLViewComponent $viewComponent)
 {
     $layout_name = null;
     $layout_params = [];
     foreach ($this->annotations as $key => $value) {
         if ($key == "layout") {
             $layout_name = $value;
         }
         if (strpos($key, "layout.") !== false) {
             $layout_key = substr($key, strlen("layout."));
             $layout_params[$layout_key] = $value;
         }
     }
     if ($layout_name) {
         $viewComponent->layout($layout_name);
     }
     if ($layout_params) {
         $viewComponent->layoutParams($layout_params);
     }
 }