protected function separateUrlParams($url, $params)
    {
        $a = parse_url($url);

        if (!empty($a['query'])) {
            parse_str($a['query'], $qparts);
            $cleanParams = array();
            foreach ($qparts as $k => $v) {
                $cleanParams[$k] = $v ? $v : '';
            }
            $params   = array_merge($params, $cleanParams);
            $urlParts = explode('?', $url, 2);
            $url      = $urlParts[0];
        }

        return array($url, $params);
    }
protected function separateUrlParams($url, $params)
    {
        $a = parse_url($url);

        if (!empty($a['query'])) {
            parse_str($a['query'], $qparts);
            $cleanParams = array();
            foreach ($qparts as $k => $v) {
                $cleanParams[$k] = $v ? $v : '';
            }
            $params   = array_merge($params, $cleanParams);
            $urlParts = explode('?', $url, 2);
            $url      = $urlParts[0];
        }

        return array($url, $params);
    }
protected function separateUrlParams ( $ url , $ params ) { $ a = parse_url ( $ url ) ; if ( ! empty ( $ a [ 'query' ] ) ) { parse_str ( $ a [ 'query' ] , $ qparts ) ; $ cleanParams = array ( ) ; foreach ( $ qparts as $ k => $ v ) { $ cleanParams [ $ k ] = $ v ? $ v : '' ; } $ params = array_merge ( $ params , $ cleanParams ) ; $ urlParts = explode ( '?' , $ url , 2 ) ; $ url = $ urlParts [ 0 ] ; } return array ( $ url , $ params ) ; }
Separates parameters from base URL

@param $url
@param $params

@return array
Separates parameters from base URL