public function parse($value)
    {
        if (is_array($value) || is_object($value)) {
            foreach ($value as $_key => &$_value) {
                $_value = $this->parse($_value, $args);
            } // unset($_key, $_value);

            return $value;
        }
        if (!($yaml = (string) $value)) {
            return []; // Empty.
        }
        try {
            $array = Parser::parse($yaml);
        } catch (\Throwable $Throwable) {
            $array = []; // Empty.
        }
        return is_array($array) ? $array : [];
    }
public function parse($value)
    {
        if (is_array($value) || is_object($value)) {
            foreach ($value as $_key => &$_value) {
                $_value = $this->parse($_value, $args);
            } // unset($_key, $_value);

            return $value;
        }
        if (!($yaml = (string) $value)) {
            return []; // Empty.
        }
        try {
            $array = Parser::parse($yaml);
        } catch (\Throwable $Throwable) {
            $array = []; // Empty.
        }
        return is_array($array) ? $array : [];
    }
public function parse ( $ value ) { if ( is_array ( $ value ) || is_object ( $ value ) ) { foreach ( $ value as $ _key => & $ _value ) { $ _value = $ this -> parse ( $ _value , $ args ) ; } // unset($_key, $_value); return $ value ; } if ( ! ( $ yaml = ( string ) $ value ) ) { return [ ] ; // Empty. } try { $ array = Parser :: parse ( $ yaml ) ; } catch ( \ Throwable $ Throwable ) { $ array = [ ] ; // Empty. } return is_array ( $ array ) ? $ array : [ ] ; }
YAML parser.

@since 150424 Initial release.

@param mixed $value Any input value.

@return array|object Converted value(s).
YAML parser .