Set the base path for the URL

@param string|null $basePath
@return Zend_Controller_Request_Http
493687
public function setBasePath($basePath = null) {
        if ($basePath === null) {
            $filename = (isset($this->SERVER['SCRIPT_FILENAME']))
                      ? basename($this->SERVER['SCRIPT_FILENAME'])
                      : '';

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

            if (basename($baseUrl) === $filename) {
                $basePath = dirname($baseUrl);
            } else {
                $basePath = $baseUrl;
            }
        }

        if (substr(PHP_OS, 0, 3) === 'WIN') {
            $basePath = str_replace('\\', '/', $basePath);
        }

        $this->_basePath = rtrim($basePath, '/');
        return $this;
    }
1199321
public function withBasePath($basePath)
    {
        if (!is_string($basePath)) {
            throw new InvalidArgumentException('Uri path must be a string');
        }
        if (!empty($basePath)) {
            $basePath = '/' . trim($basePath, '/'); // <-- Trim on both sides
        }
        $clone = clone $this;

        if ($basePath !== '/') {
            $clone->basePath = $this->filterPath($basePath);
        }

        return $clone;
    }
1210099
public function load($basePath)
    {
        $this->basePath = $basePath;
        $this->renderer = new Renderer($this->getViewsPath());

        return
            $this
                ->loadCustomTables()
                ->loadPostTypes()
                ->loadFieldGroups()
                ->loadAcfJson()
                ->loadActions()
                ->loadShortCodes()
                ->loadOptionScreens()
                ->loadCliCommands();
    }
1090833
public function setBasePath(string $basePath): bool
    {
        $basePath = App::getAlias($basePath);
        return SeasLog::setBasePath($basePath);
    }
742266
public function setBaseUrl($baseUrl)
    {
        if ($baseUrl) {
            if (UrlHelper::isUrl($baseUrl)) {
                $this->baseUrl = rtrim($baseUrl, '/') . '/';
            } else {
                $this->baseUrl = rtrim($baseUrl, '/') . '/';
            }
        }

        return $this;
    }
456391
public function getUrl($paths, $basePath = null)
    {
        if (is_array($paths) === false) {
            $paths = array($paths);
        }

        $minUrl = $this->container->get('router')->generate('rednose_combo_handler_combo');

        foreach ($paths as &$path) {
            if ($basePath !== null) {
                $path = $basePath . '/' . $path;
            }

            $files[] = $path;
        }

        $files = implode(',', $paths);

        return $minUrl . '?' . $files;
    }
1051421
public function base($path = null)
    {
        return ($this->baseUrl ? rtrim($this->baseUrl, '/' ).'/' : '/').($path ? trim($path, '/') : '');
    }
550675
public function getBasePath()
    {
        if (null == $this->basePath) {
            $this->basePath = strtolower($this->controllerName);
        }
        return $this->basePath;
    }
830182
public function setBasePath(string $path)
    {
        if (Assert::stringNotEmpty($path)) {
            $this->basePath = rtrim($path, '\\/') . $this->separator;
        }
    }
527229
public Routes setBaseViewPath(String baseViewPath) {
		if (StrKit.isBlank(baseViewPath)) {
			throw new IllegalArgumentException("baseViewPath can not be blank");
		}
		
		baseViewPath = baseViewPath.trim();
		if (! baseViewPath.startsWith("/")) {			// add prefix "/"
			baseViewPath = "/" + baseViewPath;
		}
		if (baseViewPath.endsWith("/")) {				// remove "/" in the end of baseViewPath
			baseViewPath = baseViewPath.substring(0, baseViewPath.length() - 1);
		}
		
		this.baseViewPath = baseViewPath;
		return this;
	}
465930
public function setBasePath($basePath) {
        $basePath = (string) $basePath;
        if (file_exists($basePath . '/ckeditor.js')) {
            $this->basePath = $basePath;
        } else {
            throw new \Zend_Exception(sprintf('CKEditor.php not found at %s', $basePath));
        }

        return $this;
    }
225661
public function resourcesPath(?string $resourcesPath = null) {
        if ($resourcesPath != null) {
            $this->resourcesPath = $resourcesPath;
        }
        else if (!isset($this->resourcesPath)) {
            $this->resourcesPath = get_property("app.resources_path", $this->basePath . DIRECTORY_SEPARATOR . "resources");
        }
        return $this->resourcesPath;
    }
134220
public function basePath($basePath = null)
    {
        if (!func_num_args()) {
            return $this->_basePath;
        }
        $this->_basePathTmp = $basePath;
        if ($this->_ignorePath) {
            $basePath = preg_replace($this->_ignorePath, '', $basePath);
        }
        $this->_basePath = $basePath && $basePath !== '/' ? '/' . trim($basePath, '/') : '';
        return $this;
    }
841748
public function basePath($path = '')
    {
        return $this->getFilesystem()->dirname($this->path()) . ($path ? DIRECTORY_SEPARATOR . $path : $path);
    }
1086120
private function getBasePath()
	{
		$pathInfo = new Http\RequestFactory;
		$basePath = rtrim($pathInfo->createHttpRequest()->url->basePath, '/');
		return $basePath;
	}
267456
public function setPath($path)
    {
        if ($this->validatePath($path) === false) {
            require_once 'Zend/Uri/Exception.php';
            throw new Zend_Uri_Exception("Path \"$path\" is not a valid HTTP path");
        }

        $oldPath     = $this->_path;
        $this->_path = $path;

        return $oldPath;
    }
429196
public function setFilePath($filePath)
    {
        Assert::stringNotEmpty($filePath, 'The factory file path must be a non-empty string. Got: %s');

        $this->setDirectory(Path::getDirectory($filePath));
        $this->setFileName(Path::getFilename($filePath));

        return $this;
    }