private function parseUrl($url)
    {
        $parsed = parse_url($url);

        if ((count($parsed) === 1)
            && isset($parsed['path'])
            && (0 === strpos($parsed['path'], '?') || false !== strpos($parsed['path'], '&'))
        ) {
            $parsed = array(
                'query' => $parsed['path']
            );

            return $parsed;
        }

        return $parsed;
    }
private function parseUrl($url)
    {
        $parsed = parse_url($url);

        if ((count($parsed) === 1)
            && isset($parsed['path'])
            && (0 === strpos($parsed['path'], '?') || false !== strpos($parsed['path'], '&'))
        ) {
            $parsed = array(
                'query' => $parsed['path']
            );

            return $parsed;
        }

        return $parsed;
    }
private function parseUrl ( $ url ) { $ parsed = parse_url ( $ url ) ; if ( ( count ( $ parsed ) === 1 ) && isset ( $ parsed [ 'path' ] ) && ( 0 === strpos ( $ parsed [ 'path' ] , '?' ) || false !== strpos ( $ parsed [ 'path' ] , '&' ) ) ) { $ parsed = array ( 'query' => $ parsed [ 'path' ] ) ; return $ parsed ; } return $ parsed ; }
Parse the URL and fix up if it only contains only one element to make it the query element.

@param string $url The url to parse.

@return array
Parse the URL and fix up if it only contains only one element to make it the query element .