public function basePath($basePath)
    {
        if (strlen($basePath) > 1 && substr($basePath, -1) === '/') {
            $this->basePath = substr($basePath, 0, -1);
        } else {
            $this->basePath = $basePath;
        }

        return $this;
    }
public function basePath($basePath)
    {
        if (strlen($basePath) > 1 && substr($basePath, -1) === '/') {
            $this->basePath = substr($basePath, 0, -1);
        } else {
            $this->basePath = $basePath;
        }

        return $this;
    }
public function basePath ( $ basePath ) { if ( strlen ( $ basePath ) > 1 && substr ( $ basePath , - 1 ) === '/' ) { $ this -> basePath = substr ( $ basePath , 0 , - 1 ) ; } else { $ this -> basePath = $ basePath ; } return $ this ; }
Set the basepath used in the request.

@param string $basePath

@return self
Set the basepath used in the request .