src/Ufo/Core/Config.php
public function load(string $configPath, $overwrite = false): void
    {
        if (!file_exists($configPath)) {
            return;
        }
        $config = include $configPath;
        if (!is_array($config) && !is_object($config)) {
            return;
        }
        if (is_object($config)) {
            $config = get_object_vars($config);
        }
        $this->loadArray($config, $overwrite);
    }
public function load(string $configPath, $overwrite = false): void
    {
        if (!file_exists($configPath)) {
            return;
        }
        $config = include $configPath;
        if (!is_array($config) && !is_object($config)) {
            return;
        }
        if (is_object($config)) {
            $config = get_object_vars($config);
        }
        $this->loadArray($config, $overwrite);
    }
public function load ( string $ configPath , $ overwrite = false ) : void { if ( ! file_exists ( $ configPath ) ) { return ; } $ config = include $ configPath ; if ( ! is_array ( $ config ) && ! is_object ( $ config ) ) { return ; } if ( is_object ( $ config ) ) { $ config = get_object_vars ( $ config ) ; } $ this -> loadArray ( $ config , $ overwrite ) ; }
Loads configuration from configuration file.
@param string $configPath
@param bool $overwrite = false
Loads configuration from configuration file .