Пример #1
0
 protected function getConfigValue($key, $defaultValue = null)
 {
     if (array_key_exists($key, $this->configCache)) {
         return $this->configCache[$key];
     }
     $this->configCache[$key] = !empty($this->config) ? $this->config->get($key, $defaultValue) : $defaultValue;
     return $this->configCache[$key];
 }
Пример #2
0
 protected function getConfigFinalRules(AbstractConfig $config)
 {
     $rules = $config->getRules();
     if ($config->isFinalClass()) {
         foreach ($rules as $name => $info) {
             if (!empty($info['final'])) {
                 $rules[$name]['required'] = true;
             }
         }
     }
     return $rules;
 }
Пример #3
0
 protected function build()
 {
     parent::build();
     if (!empty($this->data['types'])) {
         $this->typesList->addTypes($this->data['types']);
     }
 }