Example #1
0
 public function addConfig(Config $config)
 {
     $this->configs[] = $config;
     $config->addConfig($this);
     $this->addVars($config->getVars());
     $this->addSectionVars($config->getSectionVars());
 }
 protected function loadConfigFile(Config $config, $keyName = null)
 {
     $this->loadTemplateEngineIfNeeded();
     $themeVars = $config->getSectionVars(Config::EXPAND_VALUE);
     if (!$keyName) {
         // false, null, empty string, etc
         foreach ($themeVars as $key => $value) {
             $this->templateEngine->assign($key, $value);
         }
     } else {
         $this->templateEngine->assign($keyName, $themeVars);
     }
     return $themeVars;
 }
  protected function loadConfigFile(Config $config, $keyName=null) {
    $this->loadTemplateEngineIfNeeded();

    $themeVars = $config->getSectionVars(true);
    
    if ($keyName === false) {
      foreach($themeVars as $key => $value) {
        $this->templateEngine->assign($key, $value);
      }
    } else {
      $this->templateEngine->assign($keyName, $themeVars);
    }
    
    return $themeVars;
  }