framework/Mvc/Router.php
protected function splitRequestPath($path)
    {
        // Domain part extract
        $parts = explode('!', $path);
        if (count($parts) > 1) {
            $domain = $parts[0];
            $path = $parts[1];
        } else {
            $domain = null;
        }

        $parts = parse_url($path);
        $basePath = !empty($parts['path']) ? $parts['path'] : '/';

        if (empty($basePath)) {
            $extension = null;
        } else {
            $extension = pathinfo($basePath, PATHINFO_EXTENSION);
            $basePath = preg_replace('~\.' . $extension . '$~', '', $basePath);
        }

        if (!in_array($extension, $this->allowedExtensions)) {
            $extension = '';
        }

        return new Route([
            'domain' => $domain,
            'basepath' => $basePath,
            'extension' => $extension,
        ]);
    }
protected function splitRequestPath($path)
    {
        // Domain part extract
        $parts = explode('!', $path);
        if (count($parts) > 1) {
            $domain = $parts[0];
            $path = $parts[1];
        } else {
            $domain = null;
        }

        $parts = parse_url($path);
        $basePath = !empty($parts['path']) ? $parts['path'] : '/';

        if (empty($basePath)) {
            $extension = null;
        } else {
            $extension = pathinfo($basePath, PATHINFO_EXTENSION);
            $basePath = preg_replace('~\.' . $extension . '$~', '', $basePath);
        }

        if (!in_array($extension, $this->allowedExtensions)) {
            $extension = '';
        }

        return new Route([
            'domain' => $domain,
            'basepath' => $basePath,
            'extension' => $extension,
        ]);
    }
protected function splitRequestPath ( $ path ) { // Domain part extract $ parts = explode ( '!' , $ path ) ; if ( count ( $ parts ) > 1 ) { $ domain = $ parts [ 0 ] ; $ path = $ parts [ 1 ] ; } else { $ domain = null ; } $ parts = parse_url ( $ path ) ; $ basePath = ! empty ( $ parts [ 'path' ] ) ? $ parts [ 'path' ] : '/' ; if ( empty ( $ basePath ) ) { $ extension = null ; } else { $ extension = pathinfo ( $ basePath , PATHINFO_EXTENSION ) ; $ basePath = preg_replace ( '~\.' . $ extension . '$~' , '' , $ basePath ) ; } if ( ! in_array ( $ extension , $ this -> allowedExtensions ) ) { $ extension = '' ; } return new Route ( [ 'domain' => $ domain , 'basepath' => $ basePath , 'extension' => $ extension , ] ) ; }
Splits canonical request path into domain, path and extension
@param string $path
@return \T4\Mvc\Route
Splits canonical request path into domain path and extension