src/ClientBuilder.php
public function withYamlConfig($file)
    {
        if (!class_exists(Yaml::class)) {
            throw new RuntimeException("You need to install 'symfony/yaml' to use this feature");
        }

        if (!is_readable($file)) {
            throw new RuntimeException("The configuration file is not readable");
        }

        $config = Yaml::parse(file_get_contents($file));
        if (!is_array($config)) {
            throw new RuntimeException("The configuration is not valid");
        }

        $this->withConfig($config);

        return $this;
    }
public function withYamlConfig($file)
    {
        if (!class_exists(Yaml::class)) {
            throw new RuntimeException("You need to install 'symfony/yaml' to use this feature");
        }

        if (!is_readable($file)) {
            throw new RuntimeException("The configuration file is not readable");
        }

        $config = Yaml::parse(file_get_contents($file));
        if (!is_array($config)) {
            throw new RuntimeException("The configuration is not valid");
        }

        $this->withConfig($config);

        return $this;
    }
public function withYamlConfig ( $ file ) { if ( ! class_exists ( Yaml :: class ) ) { throw new RuntimeException ( "You need to install 'symfony/yaml' to use this feature" ) ; } if ( ! is_readable ( $ file ) ) { throw new RuntimeException ( "The configuration file is not readable" ) ; } $ config = Yaml :: parse ( file_get_contents ( $ file ) ) ; if ( ! is_array ( $ config ) ) { throw new RuntimeException ( "The configuration is not valid" ) ; } $ this -> withConfig ( $ config ) ; return $ this ; }
Allows you load the configuration from a yaml file

IMPORTANT: you need to install 'symfony/yaml' to use this feature

@param string $file

@return $this
Allows you load the configuration from a yaml file