/** * Autoload class method */ private function setAutoload() { spl_autoload_register(function ($className) { $className = str_replace("\\", DIRECTORY_SEPARATOR, $className); $classPath = ErApplication::fileExists($className, "php"); if ($classPath) { require_once $classPath; } }); }
private function renderItem(array $block) { foreach ($block as $blockItem) { if (!is_array($blockItem[1])) { $file = $blockItem[1]; $tplFile = ErApplication::fileExists($file, "tpl") ? $file : "404"; $params = $blockItem[0]; ob_start(); include $tplFile . ".tpl"; $this->_renderCahe .= ob_get_clean(); } else { $this->renderItem($blockItem); } } }