src/MASNathan/Curl/StringParser.php
static public function parse($str, $content_type)
    {
        switch ($content_type) {
            case 'json':
                return self::toJson($str);
            
            case 'xml':
                return self::toXml($str);

            default:
                return $str;
        }
    }
static public function parse($str, $content_type)
    {
        switch ($content_type) {
            case 'json':
                return self::toJson($str);
            
            case 'xml':
                return self::toXml($str);

            default:
                return $str;
        }
    }
static public function parse ( $ str , $ content_type ) { switch ( $ content_type ) { case 'json' : return self :: toJson ( $ str ) ; case 'xml' : return self :: toXml ( $ str ) ; default : return $ str ; } }
Parses the data passed into the requested data type
@param string $str
@param string $content_type You can use one of the following: json, xml, none
@return array
Parses the data passed into the requested data type