Layton/App.php
private function matchHttpRequest($pattern)
    {
        $pattern = $this->replaceKeyWorlds($pattern);
        \preg_match_all('/\<(.*?)\>/iu', $pattern, $attrKeys);
        \array_shift($attrKeys);
        $attrKeys = $attrKeys[0];

        $pathInfo = $this->request->server->get('path-info', '/');
        $pattern = $this->replacePatternKeyword($pattern);
        $regexp = '/^'. $pattern .'\/?$/';
        if (\preg_match($regexp, $pathInfo, $matched)) {
            \array_shift($matched);
            $result = [];
            foreach ($attrKeys as $num => $key) {
                $result[$key] = $matched[$num];
            }
            return $result;
        }
        return false;
    }
private function matchHttpRequest($pattern)
    {
        $pattern = $this->replaceKeyWorlds($pattern);
        \preg_match_all('/\<(.*?)\>/iu', $pattern, $attrKeys);
        \array_shift($attrKeys);
        $attrKeys = $attrKeys[0];

        $pathInfo = $this->request->server->get('path-info', '/');
        $pattern = $this->replacePatternKeyword($pattern);
        $regexp = '/^'. $pattern .'\/?$/';
        if (\preg_match($regexp, $pathInfo, $matched)) {
            \array_shift($matched);
            $result = [];
            foreach ($attrKeys as $num => $key) {
                $result[$key] = $matched[$num];
            }
            return $result;
        }
        return false;
    }
private function matchHttpRequest ( $ pattern ) { $ pattern = $ this -> replaceKeyWorlds ( $ pattern ) ; \ preg_match_all ( '/\<(.*?)\>/iu' , $ pattern , $ attrKeys ) ; \ array_shift ( $ attrKeys ) ; $ attrKeys = $ attrKeys [ 0 ] ; $ pathInfo = $ this -> request -> server -> get ( 'path-info' , '/' ) ; $ pattern = $ this -> replacePatternKeyword ( $ pattern ) ; $ regexp = '/^' . $ pattern . '\/?$/' ; if ( \ preg_match ( $ regexp , $ pathInfo , $ matched ) ) { \ array_shift ( $ matched ) ; $ result = [ ] ; foreach ( $ attrKeys as $ num => $ key ) { $ result [ $ key ] = $ matched [ $ num ] ; } return $ result ; } return false ; }
Match route storage by request url and return params.

@param string $url

@return array|false
Match route storage by request url and return params .