code/libraries/joomlatools/library/object/config/yaml.php
public function fromString($string, $object = true)
    {
        $data = array();

        if ($decoder = $this->getDecoder())
        {
            $data = array();

            if(!empty($string))
            {
                $data = call_user_func($decoder, $string);

                if($data === false) {
                    throw new DomainException('Cannot parse YAML string');
                }
            }
        }
        else throw new RuntimeException("No Yaml decoder specified");

        return $object ? $this->merge($data) : $data;
    }
public function fromString($string, $object = true)
    {
        $data = array();

        if ($decoder = $this->getDecoder())
        {
            $data = array();

            if(!empty($string))
            {
                $data = call_user_func($decoder, $string);

                if($data === false) {
                    throw new DomainException('Cannot parse YAML string');
                }
            }
        }
        else throw new RuntimeException("No Yaml decoder specified");

        return $object ? $this->merge($data) : $data;
    }
public function fromString ( $ string , $ object = true ) { $ data = array ( ) ; if ( $ decoder = $ this -> getDecoder ( ) ) { $ data = array ( ) ; if ( ! empty ( $ string ) ) { $ data = call_user_func ( $ decoder , $ string ) ; if ( $ data === false ) { throw new DomainException ( 'Cannot parse YAML string' ) ; } } } else throw new RuntimeException ( "No Yaml decoder specified" ) ; return $ object ? $ this -> merge ( $ data ) : $ data ; }
Read from a YAML string and create a config object

@param  string $string
@param  bool    $object  If TRUE return a ConfigObject, if FALSE return an array. Default TRUE.
@throws DomainException
@throws RuntimeException
@return KObjectConfigYaml|array
Read from a YAML string and create a config object