Prado\TApplicationConfiguration::loadFromPhp PHP Метод

loadFromPhp() публичный Метод

Parses the application configuration given in terms of a PHP array.
public loadFromPhp ( $config, $configPath )
    public function loadFromPhp($config, $configPath)
    {
        // application properties
        if (isset($config['application'])) {
            foreach ($config['application'] as $name => $value) {
                $this->_properties[$name] = $value;
            }
            $this->_empty = false;
        }
        if (isset($config['paths']) && is_array($config['paths'])) {
            $this->loadPathsPhp($config['paths'], $configPath);
        }
        if (isset($config['modules']) && is_array($config['modules'])) {
            $this->loadModulesPhp($config['modules'], $configPath);
        }
        if (isset($config['services']) && is_array($config['services'])) {
            $this->loadServicesPhp($config['services'], $configPath);
        }
        if (isset($config['parameters']) && is_array($config['parameters'])) {
            $this->loadParametersPhp($config['parameters'], $configPath);
        }
        if (isset($config['includes']) && is_array($config['includes'])) {
            $this->loadExternalXml($config['includes'], $configPath);
        }
    }

Usage Example

Пример #1
0
 public function loadApplicationConfigurationFromPhp($config, $configPath)
 {
     $appConfig = new TApplicationConfiguration();
     $appConfig->loadFromPhp($config, $configPath);
     $this->_appConfigs[] = $appConfig;
 }
All Usage Examples Of Prado\TApplicationConfiguration::loadFromPhp