public function get($key, $throwEx = false)
    {
        // Make $throwEx true by default in v4.0
        if ($throwEx && !$this->parsed->hasPath($key)) {
            throw new \InvalidArgumentException(sprintf("The key '%s' was not found in %s.", $key, $this->file->getFullPath()));
        }

        $value = $this->parsed->getPath($key);

        if (is_array($value)) {
            return Yaml::dump($value, 0, 4);
        }

        return $value;
    }
public function get($key, $throwEx = false)
    {
        // Make $throwEx true by default in v4.0
        if ($throwEx && !$this->parsed->hasPath($key)) {
            throw new \InvalidArgumentException(sprintf("The key '%s' was not found in %s.", $key, $this->file->getFullPath()));
        }

        $value = $this->parsed->getPath($key);

        if (is_array($value)) {
            return Yaml::dump($value, 0, 4);
        }

        return $value;
    }
public function get ( $ key , $ throwEx = false ) { // Make $throwEx true by default in v4.0 if ( $ throwEx && ! $ this -> parsed -> hasPath ( $ key ) ) { throw new \ InvalidArgumentException ( sprintf ( "The key '%s' was not found in %s." , $ key , $ this -> file -> getFullPath ( ) ) ) ; } $ value = $ this -> parsed -> getPath ( $ key ) ; if ( is_array ( $ value ) ) { return Yaml :: dump ( $ value , 0 , 4 ) ; } return $ value ; }
Return a value for a key from the yml file.

@param string $key
@param bool   $throwEx throw exception if key is not found

@return mixed|string
Return a value for a key from the yml file .