src/Server.php
private function parsePath($path)
    {
        $parts = array(
            'template' => null,
            'path' => null,
        );

        // strip out any query params
        if (preg_match('/^\/?(.*?)\/(.*)/', $path, $matches)) {
            $parts['template'] = $matches[1];
            $parts['path'] = $matches[2];
        }

        return $parts;
    }
private function parsePath($path)
    {
        $parts = array(
            'template' => null,
            'path' => null,
        );

        // strip out any query params
        if (preg_match('/^\/?(.*?)\/(.*)/', $path, $matches)) {
            $parts['template'] = $matches[1];
            $parts['path'] = $matches[2];
        }

        return $parts;
    }
private function parsePath ( $ path ) { $ parts = array ( 'template' => null , 'path' => null , ) ; // strip out any query params if ( preg_match ( '/^\/?(.*?)\/(.*)/' , $ path , $ matches ) ) { $ parts [ 'template' ] = $ matches [ 1 ] ; $ parts [ 'path' ] = $ matches [ 2 ] ; } return $ parts ; }
Parse the request path to extract the path and template elements.

@param string $path The complet server path

@return array Array of 'template' and 'path' portions of the URL
Parse the request path to extract the path and template elements .