lithium\action\Request::_base()

protected method

Find the base path of the current request.

Parameters

  • string $base

    The base path. If null, 'PHP_SELF' will be used instead.

Returns

string

Source

	protected function _base($base = null) {
		if ($base === null) {
			$base = preg_replace('/[^\/]+$/', '', $this->env('PHP_SELF'));
		}
		$base = trim(str_replace(array("/app/webroot", '/webroot'), '', $base), '/');
		return $base ? '/' . $base : '';
	}