protected static function _applyUrlFilters($url)
    {
        $request = static::getRequest(true);
        $e = null;
        foreach (static::$_urlFilters as $filter) {
            try {
                $url = $filter($url, $request);
            } catch (Exception $e) {
                // fall through
            } catch (Throwable $e) {
                // fall through
            }
            if ($e !== null) {
                if (is_array($filter)) {
                    $ref = new ReflectionMethod($filter[0], $filter[1]);
                } else {
                    $ref = new ReflectionFunction($filter);
                }
                $message = sprintf(
                    'URL filter defined in %s on line %s could not be applied. The filter failed with: %s',
                    $ref->getFileName(),
                    $ref->getStartLine(),
                    $e->getMessage()
                );
                throw new RuntimeException($message, $e->getCode(), $e);
            }
        }

        return $url;
    }
protected static function _applyUrlFilters($url)
    {
        $request = static::getRequest(true);
        $e = null;
        foreach (static::$_urlFilters as $filter) {
            try {
                $url = $filter($url, $request);
            } catch (Exception $e) {
                // fall through
            } catch (Throwable $e) {
                // fall through
            }
            if ($e !== null) {
                if (is_array($filter)) {
                    $ref = new ReflectionMethod($filter[0], $filter[1]);
                } else {
                    $ref = new ReflectionFunction($filter);
                }
                $message = sprintf(
                    'URL filter defined in %s on line %s could not be applied. The filter failed with: %s',
                    $ref->getFileName(),
                    $ref->getStartLine(),
                    $e->getMessage()
                );
                throw new RuntimeException($message, $e->getCode(), $e);
            }
        }

        return $url;
    }
protected static function _applyUrlFilters ( $ url ) { $ request = static :: getRequest ( true ) ; $ e = null ; foreach ( static :: $ _urlFilters as $ filter ) { try { $ url = $ filter ( $ url , $ request ) ; } catch ( Exception $ e ) { // fall through } catch ( Throwable $ e ) { // fall through } if ( $ e !== null ) { if ( is_array ( $ filter ) ) { $ ref = new ReflectionMethod ( $ filter [ 0 ] , $ filter [ 1 ] ) ; } else { $ ref = new ReflectionFunction ( $ filter ) ; } $ message = sprintf ( 'URL filter defined in %s on line %s could not be applied. The filter failed with: %s' , $ ref -> getFileName ( ) , $ ref -> getStartLine ( ) , $ e -> getMessage ( ) ) ; throw new RuntimeException ( $ message , $ e -> getCode ( ) , $ e ) ; } } return $ url ; }
Applies all the connected URL filters to the URL.

@param array $url The URL array being modified.
@return array The modified URL.
@see \Cake\Routing\Router::url()
@see \Cake\Routing\Router::addUrlFilter()
Applies all the connected URL filters to the URL .