Example #1
0
 /**
  * Render the partial view script
  * @param string $partialName
  * @return ViewModel
  */
 public function renderPartial($partialName, $content = null)
 {
     if (!$partialName) {
         throw new ViewException();
     }
     $path = ConfigReader::getSection('view')['template_map'];
     ob_start();
     require_once $path[$partialName];
     return ob_get_clean();
 }
Example #2
0
 /**
  * Read the config files
  */
 protected function setConfig()
 {
     $this->routeConfig = ConfigReader::getSection('route');
     //throw new ConfigException('Ошибка конфигурации');
 }