src/Library/Helper/Url.php
public static function getParameter($param = false, $url = false)
    {
        if (empty($param)) {
            return null;
        }
        if (!$url || !strlen($url)) {
            $url = self::getRequestUrl();
        }

        $parsed_url = self::parse($url);
        $params = (isset($parsed_url['params']) && count($parsed_url['params'])) 
            ? $parsed_url['params'] : false;

        if ($param && strlen($param)) {
            if ($params) {
                foreach($params as $p=>$v) {
                    if ($p==$param) return $v;
                }
            }
            return false;
        }
        return $params;
    }
public static function getParameter($param = false, $url = false)
    {
        if (empty($param)) {
            return null;
        }
        if (!$url || !strlen($url)) {
            $url = self::getRequestUrl();
        }

        $parsed_url = self::parse($url);
        $params = (isset($parsed_url['params']) && count($parsed_url['params'])) 
            ? $parsed_url['params'] : false;

        if ($param && strlen($param)) {
            if ($params) {
                foreach($params as $p=>$v) {
                    if ($p==$param) return $v;
                }
            }
            return false;
        }
        return $params;
    }
public static function getParameter ( $ param = false , $ url = false ) { if ( empty ( $ param ) ) { return null ; } if ( ! $ url || ! strlen ( $ url ) ) { $ url = self :: getRequestUrl ( ) ; } $ parsed_url = self :: parse ( $ url ) ; $ params = ( isset ( $ parsed_url [ 'params' ] ) && count ( $ parsed_url [ 'params' ] ) ) ? $ parsed_url [ 'params' ] : false ; if ( $ param && strlen ( $ param ) ) { if ( $ params ) { foreach ( $ params as $ p => $ v ) { if ( $ p == $ param ) return $ v ; } } return false ; } return $ params ; }
Get the value of an URL parameter

@param   string/bool     $param  A parameter to get, or `false` to get the global parameters array
@param   string/null     $url    The URL to work on (`self::getRequestUrl()` by default)
@return  string/array    The parameter value or the global array of parameters
Get the value of an URL parameter