public function load()
    {
        $config = new UserConfiguration();
        if (!file_exists($this->storagePath)) {
            return $config;
        }

        try {
            $data = Yaml::parse(file_get_contents($this->storagePath));
        } catch (ParseException $e) {
            throw new ConfigException(sprintf('The config file "%s" is not a valid YAML.', $this->storagePath), 0, $e);
        }

        if (is_array($data)) {
            $config->load($data);
        }

        return $config;
    }
public function load()
    {
        $config = new UserConfiguration();
        if (!file_exists($this->storagePath)) {
            return $config;
        }

        try {
            $data = Yaml::parse(file_get_contents($this->storagePath));
        } catch (ParseException $e) {
            throw new ConfigException(sprintf('The config file "%s" is not a valid YAML.', $this->storagePath), 0, $e);
        }

        if (is_array($data)) {
            $config->load($data);
        }

        return $config;
    }
public function load ( ) { $ config = new UserConfiguration ( ) ; if ( ! file_exists ( $ this -> storagePath ) ) { return $ config ; } try { $ data = Yaml :: parse ( file_get_contents ( $ this -> storagePath ) ) ; } catch ( ParseException $ e ) { throw new ConfigException ( sprintf ( 'The config file "%s" is not a valid YAML.' , $ this -> storagePath ) , 0 , $ e ) ; } if ( is_array ( $ data ) ) { $ config -> load ( $ data ) ; } return $ config ; }
Load stored configuration. Returns an empty UserConfiguration if no previous configuration was stored.

@return UserConfiguration
Load stored configuration . Returns an empty UserConfiguration if no previous configuration was stored .