Yiinitializr\Helpers\Config::settings PHP Méthode

settings() public static méthode

Reads the configuration settings from the file
public static settings ( ) : array | mixed
Résultat array | mixed
    public static function settings()
    {
        if (null === self::$_settings) {
            self::$_settings = file_exists(self::getConfigurationDirectoryPath() . '/settings.php') ? require_once self::getConfigurationDirectoryPath() . '/settings.php' : array();
            self::$_settings['envlock'] = file_exists(self::getEnvironmentLockFilePath());
            if (($customSettings = ArrayX::get(self::$_settings, 'custom.path')) !== null && file_exists($customSettings)) {
                self::$_settings = ArrayX::merge(self::$_settings, require_once $customSettings);
            }
        }
        if (empty(self::$_settings)) {
            throw new \Exception('Unable to find Yiinitialzr settings file!');
        }
        return self::$_settings;
    }