lithium\action\Request::_base PHP Method

_base() protected method

Find the base path of the current request.
protected _base ( string $base = null ) : string
$base string The base path. If `null`, `'PHP_SELF'` will be used instead.
return string
    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 : '';
    }