public static function getComponent($componentClass) { $component = new $componentClass(); $templateFileName = $component->getTemplateFileName(); $template = TemplateFactory::getTemplate($templateFileName, array()); $component->assignTemplate($template); return $component; }
public function render($template_vars) { $filename = $this->parameters[0]; $template = TemplateFactory::getTemplate($filename, $template_vars); if ($this->component) { $template->attach_component($this->component); } ob_start(); $template->show(); $output = ob_get_contents(); ob_end_clean(); return $output; }