public static function url($action = null, $module = null, $extension = null, $params = array())
    {

        if (is_null($module)) {
            $module = Context::getInstance()->getModuleName();
        }
        if (is_null($action)) {
            $action = Context::getInstance()->getActionName();
        }
        if (is_null($extension)) {
            $extension = Context::getInstance()->getExtensionName();
        }

        $returnValue = self::getRootUrl() . $extension . '/' . $module . '/' . $action;

        if (is_string($params) && strlen($params) > 0) {
            $returnValue .= '?' . $params;
        }

        if (is_array($params) && count($params) ) {
            $returnValue .= '?';
            foreach ($params as $key => $value) {
                $returnValue .= $key . '=' . rawurlencode($value) . '&';
            }
            $returnValue = substr($returnValue, 0, -1);
        }

        return $returnValue;
    }
public static function url($action = null, $module = null, $extension = null, $params = array())
    {

        if (is_null($module)) {
            $module = Context::getInstance()->getModuleName();
        }
        if (is_null($action)) {
            $action = Context::getInstance()->getActionName();
        }
        if (is_null($extension)) {
            $extension = Context::getInstance()->getExtensionName();
        }

        $returnValue = self::getRootUrl() . $extension . '/' . $module . '/' . $action;

        if (is_string($params) && strlen($params) > 0) {
            $returnValue .= '?' . $params;
        }

        if (is_array($params) && count($params) ) {
            $returnValue .= '?';
            foreach ($params as $key => $value) {
                $returnValue .= $key . '=' . rawurlencode($value) . '&';
            }
            $returnValue = substr($returnValue, 0, -1);
        }

        return $returnValue;
    }
public static function url ( $ action = null , $ module = null , $ extension = null , $ params = array ( ) ) { if ( is_null ( $ module ) ) { $ module = Context :: getInstance ( ) -> getModuleName ( ) ; } if ( is_null ( $ action ) ) { $ action = Context :: getInstance ( ) -> getActionName ( ) ; } if ( is_null ( $ extension ) ) { $ extension = Context :: getInstance ( ) -> getExtensionName ( ) ; } $ returnValue = self :: getRootUrl ( ) . $ extension . '/' . $ module . '/' . $ action ; if ( is_string ( $ params ) && strlen ( $ params ) > 0 ) { $ returnValue .= '?' . $ params ; } if ( is_array ( $ params ) && count ( $ params ) ) { $ returnValue .= '?' ; foreach ( $ params as $ key => $ value ) { $ returnValue .= $ key . '=' . rawurlencode ( $ value ) . '&' ; } $ returnValue = substr ( $ returnValue , 0 , - 1 ) ; } return $ returnValue ; }
conveniance method to create urls based on the current MVC context and
it for the used kind of url resolving

@access public
@author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>
@param  string action
@param  string module
@param  string extension
@param  array|string params
@return string
conveniance method to create urls based on the current MVC context and it for the used kind of url resolving