protected function prepareBasePath()
    {
        $baseUrl = $this->getBaseUrl();
        if (empty($baseUrl)) {
            return '';
        }

        $filename = basename($this->server->get('SCRIPT_FILENAME'));
        if (basename($baseUrl) === $filename) {
            $basePath = \dirname($baseUrl);
        } else {
            $basePath = $baseUrl;
        }

        if ('\\' === \DIRECTORY_SEPARATOR) {
            $basePath = str_replace('\\', '/', $basePath);
        }

        return rtrim($basePath, '/');
    }
protected function prepareBasePath()
    {
        $baseUrl = $this->getBaseUrl();
        if (empty($baseUrl)) {
            return '';
        }

        $filename = basename($this->server->get('SCRIPT_FILENAME'));
        if (basename($baseUrl) === $filename) {
            $basePath = \dirname($baseUrl);
        } else {
            $basePath = $baseUrl;
        }

        if ('\\' === \DIRECTORY_SEPARATOR) {
            $basePath = str_replace('\\', '/', $basePath);
        }

        return rtrim($basePath, '/');
    }
protected function prepareBasePath ( ) { $ baseUrl = $ this -> getBaseUrl ( ) ; if ( empty ( $ baseUrl ) ) { return '' ; } $ filename = basename ( $ this -> server -> get ( 'SCRIPT_FILENAME' ) ) ; if ( basename ( $ baseUrl ) === $ filename ) { $ basePath = \ dirname ( $ baseUrl ) ; } else { $ basePath = $ baseUrl ; } if ( '\\' === \ DIRECTORY_SEPARATOR ) { $ basePath = str_replace ( '\\' , '/' , $ basePath ) ; } return rtrim ( $ basePath , '/' ) ; }
Prepares the base path.

@return string base path
Prepares the base path .