src/Http/Middleware/BasePath.php
private function addBasePath($path)
    {
        if (\strpos($path, $this->basePath) === 0) {
            return $path;
        }

        return \str_replace('//', '/', $this->basePath . '/' . $path);
    }
private function addBasePath($path)
    {
        if (\strpos($path, $this->basePath) === 0) {
            return $path;
        }

        return \str_replace('//', '/', $this->basePath . '/' . $path);
    }
private function addBasePath ( $ path ) { if ( \ strpos ( $ path , $ this -> basePath ) === 0 ) { return $ path ; } return \ str_replace ( '//' , '/' , $ this -> basePath . '/' . $ path ) ; }
Adds the basepath to a path.

@param string $path

@return string
Adds the basepath to a path .