function compile(Engine $factory) { $closure = $this->func; $obj = new HTMLViewComponent($this->template, $closure); $obj->_holderName = $this->getHolderName(); return $obj->compile(); }
public function replaceSections($template) { //sectionを変換する $view = new HTMLViewComponent($template); $template = $view->compile(); return $template; }
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); } }