Get Base Path
@return string
551845
private static function getBasePath()
    {
        if (empty(self::$basePath)) {
            self::$basePath = sprintf('%s%s%s', sys_get_temp_dir(), DIRECTORY_SEPARATOR, self::BASE_PATH_NAME);
        }
        return self::$basePath;
    }
387460
public function getBasePath() : string
    {
        $baseUri = $this->getBase();
        $path = ltrim($this->getPath(), "/");

        $absoluteUri = $baseUri . (($path === "") ? "" : "/" . $path);

        return $absoluteUri;
    }
500656
public function getRootPath()
    {
        $appPath = app_path();
        $folders = explode(DIRECTORY_SEPARATOR, $appPath);
        array_pop($folders);
        $rootPath = implode(DIRECTORY_SEPARATOR, $folders);

        return $rootPath . '/';
    }
1165778
public function getBaseUrl($path)
    {
        if (1 === \count($this->baseUrls)) {
            return $this->baseUrls[0];
        }

        return $this->baseUrls[$this->chooseBaseUrl($path)];
    }
75416
public function getBaseUrl()
    {
        $url = '';
        if (isset($this->scheme)) {
            if ('' !== $this->scheme) {
                $url .= $this->scheme . ':';
            }
            $url .= '//';
        }

        if (isset($this->user)) {
            $url .= $this->user;

            if (isset($this->pass)) {
                $url .= ':' . $this->pass;
            }

            $url .= '@';
        }

        $url .= $this->host;

        if (isset($this->port)) {
            $url .= ':' . $this->port;
        }

        if (isset($this->path)) {
            if ($url != '' && $this->path[0] !== '/') {
                $url .= '/';
            }

            $url .= $this->path;
        }

        return $url;
    }
800217
protected function _getBaseUrl() {
		do {
			$baseUrl = $this->in(__d('cake_installer', 'Input base URL (e.g. %s):', 'http://someapp.fabrikam.com'));
			$baseUrl = trim($baseUrl);
		} while (!preg_match('/http[s]?\:\/\/[A-z0-9\.\/]+/', $baseUrl));

		return trim($baseUrl, '/');
	}
22364
protected static function getBaseUrl()
  {
    $baseUrl = 'https://';
    if (!self::$ssl) {
      $baseUrl = 'http://';
    }
    $baseUrl .= sprintf('%s:%s/%s/', self::$host, self::$port, self::$context);
    return $baseUrl;
  }
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;
    }
1325726
protected function _getAppBase()
    {
        $baseUrl = Configure::read('App.base');
        if (!$baseUrl) {
            $request = Router::getRequest(true);
            if (!$request) {
                $baseUrl = '';
            } else {
                $baseUrl = $request->base;
            }
        }
        return $baseUrl . '/';
    }
204653
def base_path(self):
        """"""
        return os.path.join(self.container.base_path, self.name)
1126770
public function getBasePublicPath()
    {
        $projectPath = $this->getBasePath();
        $publicPath = $this->publicPathExists()
            ? Util::joinPaths($projectPath, self::PUBLIC_PATH, self::RESOURCES_PATH)
            : Util::joinPaths($projectPath, self::RESOURCES_PATH);
        return $publicPath;
    }
1187778
public function publicPath()
    {
        if (!isset($this->publicPath)) {
            $this->publicPath = $this->basePath().'www'.DIRECTORY_SEPARATOR;
        }

        return $this->publicPath;
    }
1157447
public function getPath() {
		if ($this->isLocal) {
			return $this->basePath . DIRECTORY_SEPARATOR . $this->name;
		}
		
		return $this->basePath . $this->name;
	}
1349786
public function get_taskbasepath() {
        $basepath = $this->get_basepath();

        // Module blocks are under module dir
        if (!empty($this->moduleid)) {
            $basepath .= '/activities/' . $this->modulename . '_' . $this->moduleid .
                         '/blocks/' . $this->blockname . '_' . $this->blockid;

        // Course blocks are under course dir
        } else {
            $basepath .= '/course/blocks/' . $this->blockname . '_' . $this->blockid;
        }
        return $basepath;
    }
1180828
public function getRootPath()
    {
        if (null === $this->rootPath) {
            if (method_exists($this, 'setRootPath')) {
                $this->rootPath = realpath($this->setRootPath());
            } else {
                $this->rootPath = realpath(__DIR__.'/../../../../..');
            }
        }
        //$this->rootPath = '../';

        return $this->rootPath;
    }
918305
public function getBasePath()
    {
        if ($this->basePath === null) {
            $this->setBasePath($this->detectBasePath());
        }

        return $this->basePath;
    }
1319068
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, '/');
    }