src/Url/Url.php
public static function getCurrent($pRelative = true, array $pNewParams = array())
    {
        if (self::$_request === NULL) {
            self::setRequest();
        }

        $request = self::$_request;

        $module = $request->getModule();
        $view   = $request->getView();

        $params = str_replace($module . DS . $view, '', $request->getReq());
        if (! empty($pNewParams)) {
            $newParams = array();
            foreach ($pNewParams as $key => $value) {
                $newParams[] = $key . DS . $value;
            }

            $params .= DS . implode(DS, $newParams);
        }

        $params = trim($params, DS);

        if ($module == $request::DEFAULT_MODULE and $view == $request::DEFAULT_VIEW and ! $params) {
            return self::get('', $params, $pRelative);
        }

        return self::get($module . DS . $view, $params, $pRelative);
    }
public static function getCurrent($pRelative = true, array $pNewParams = array())
    {
        if (self::$_request === NULL) {
            self::setRequest();
        }

        $request = self::$_request;

        $module = $request->getModule();
        $view   = $request->getView();

        $params = str_replace($module . DS . $view, '', $request->getReq());
        if (! empty($pNewParams)) {
            $newParams = array();
            foreach ($pNewParams as $key => $value) {
                $newParams[] = $key . DS . $value;
            }

            $params .= DS . implode(DS, $newParams);
        }

        $params = trim($params, DS);

        if ($module == $request::DEFAULT_MODULE and $view == $request::DEFAULT_VIEW and ! $params) {
            return self::get('', $params, $pRelative);
        }

        return self::get($module . DS . $view, $params, $pRelative);
    }
public static function getCurrent ( $ pRelative = true , array $ pNewParams = array ( ) ) { if ( self :: $ _request === NULL ) { self :: setRequest ( ) ; } $ request = self :: $ _request ; $ module = $ request -> getModule ( ) ; $ view = $ request -> getView ( ) ; $ params = str_replace ( $ module . DS . $ view , '' , $ request -> getReq ( ) ) ; if ( ! empty ( $ pNewParams ) ) { $ newParams = array ( ) ; foreach ( $ pNewParams as $ key => $ value ) { $ newParams [ ] = $ key . DS . $ value ; } $ params .= DS . implode ( DS , $ newParams ) ; } $ params = trim ( $ params , DS ) ; if ( $ module == $ request :: DEFAULT_MODULE and $ view == $ request :: DEFAULT_VIEW and ! $ params ) { return self :: get ( '' , $ params , $ pRelative ) ; } return self :: get ( $ module . DS . $ view , $ params , $ pRelative ) ; }
Return the current URL with optional additional params.

@param bool $pRelative Return a relative URL or a full HTTP URL.
@param array $pNewParams Parameters to add to the request (additional)
@return string
Return the current URL with optional additional params .