public static function decodeQueryString($source, $rfc = self::RFC_3986)
    {
        $ret = [];
        if ($source !== '') {
            $decode = self::getQueryStringDecoder($rfc);
            $queryPairs = explode('&', $source);
            foreach ($queryPairs as $pair) {
                $parts = explode('=', $pair, 2);
                $key = $decode($parts[0]);
                $value = (count($parts) === 1) ? true : $decode($parts[1]);
                Arr::addValue($ret, $key, $value);
            }
        }

        return $ret;
    }
public static function decodeQueryString($source, $rfc = self::RFC_3986)
    {
        $ret = [];
        if ($source !== '') {
            $decode = self::getQueryStringDecoder($rfc);
            $queryPairs = explode('&', $source);
            foreach ($queryPairs as $pair) {
                $parts = explode('=', $pair, 2);
                $key = $decode($parts[0]);
                $value = (count($parts) === 1) ? true : $decode($parts[1]);
                Arr::addValue($ret, $key, $value);
            }
        }

        return $ret;
    }
public static function decodeQueryString ( $ source , $ rfc = self :: RFC_3986 ) { $ ret = [ ] ; if ( $ source !== '' ) { $ decode = self :: getQueryStringDecoder ( $ rfc ) ; $ queryPairs = explode ( '&' , $ source ) ; foreach ( $ queryPairs as $ pair ) { $ parts = explode ( '=' , $ pair , 2 ) ; $ key = $ decode ( $ parts [ 0 ] ) ; $ value = ( count ( $ parts ) === 1 ) ? true : $ decode ( $ parts [ 1 ] ) ; Arr :: addValue ( $ ret , $ key , $ value ) ; } } return $ ret ; }
Parse a url encoded string into an array of values

php's `parse_url` requires brackets to indicate an array; this function
will parse values of the same name into an array if brackets don't exist
@param string $source
@return array<string,mixed>
Parse a url encoded string into an array of values