Returns the root path of the request.

In most case this value will be the same as AnRequest::base however it can be
changed by pushing in a different value

@return  object  A AnHttpUrl object
19348
public static function root($path = null)
    {
        if (! is_null($path)) {
            if (! $path instanceof KhttpUrl) {
                $path = AnService::get('anahita:http.url', array('url' => $path));
            }

            self::$_root = $path;
        }

        if (is_null(self::$_root)) {
            self::$_root = self::$_base;
        }

        return self::$_root;
    }
883651
public function baseUrl()
    {
        if (isset($this->baseUrl)) {
            return $this->baseUrl;
        }

        $config = $this->getPackageConfig();

        if (isset($config['baseUrl'])) {
            return $config['baseUrl'];
        }

        return 'http://localhost:8888';
    }
503832
public static function base()
    {
        return Request::getUri()->getScheme().'://'.Request::getUri()->getHost().
            Request::getUri()->getBasePath();
    }
1044844
public function getRootPath()
    {
        if (null === $this->rootPath) {
            $this->rootPath = dirname((new \ReflectionClass($this))->getFileName());
        }

        return $this->rootPath;
    }
1177627
public function basePath()
    {
        if ($this->dirname && $this->basename) {
            return ($this->dirname .'/'. $this->basename);
        }

        return null;
    }
899668
public function baseUrl()
    {
        static $base = null;
        if ($base === null) {
            $base = $this->_View->request->base;
        }

        return $base;
    }
362359
public function getBaseUri()
    {
        $script = $this->get('script');
        $base   = str_replace('\\', '/', dirname($script));

        if ($base != '/') {
            $url = strtolower($this->get('scheme')) . $this->get('name') . $base;
        } else {
            $url = strtolower($this->get('scheme')) . $this->get('name');
        }

        return $url;
    }
1199898
protected function root()
    {
        if(isset($_GET['_framework_url_']))
        {
            $url = $_GET['_framework_url_'];
        }
        else return false;

        $parts = explode('/', $url);
        $count = count($parts)-2;
        //
        $path = $parts > 1 ? '../' : '';

        for ($i=0; $i <$count; $i++) 
        { 
            $path .= '../';
        }

        \Vinala\Kernel\Foundation\Application::$path = $path;
        return $path;
    }
922007
public function rootUrl()
    {
        $base = $this->root();
        $root = strpos($base, '.') ? ltrim(dirname($base), DIRECTORY_SEPARATOR) : $base;
        if ('' != $root) {
            $root = '/' . ltrim($root, '/');
        }
        return $root;
    }
908867
public function GetBaseUrl () {
		if ($this->baseUrl === NULL) 
			$this->baseUrl = $this->GetDomainUrl() . $this->GetBasePath();
		return $this->baseUrl;
	}
1165188
public static function root()
    {
        $url = request('REQUEST_URI', '', 'server');
        $root = request('DOCUMENT_ROOT', '', 'server');
        $scheme = request('REQUEST_SCHEME', '', 'server');
        $server = request('SERVER_NAME', '', 'server');

        $url = substr($url, 1);

        $parts = explode('/', $url);
        //
        $folder = '';
        //
        for ($i = 0; $i < count($parts); $i++) {
            if (File::isDirectory($root.$folder.$parts[$i].'/')) {
                $folder .= $parts[$i].'/';
            } else {
                break;
            }
        }

        return $scheme.'://'.$server.'/'.$folder;
    }
918305
public function getBasePath()
    {
        if ($this->basePath === null) {
            $this->setBasePath($this->detectBasePath());
        }

        return $this->basePath;
    }
1253804
public function getRootDirectory()
    {
        if(isset($this->rootDirectory) == false) {
            $this->rootDirectory = $this->locateRootDirectory();
        }
        return $this->rootDirectory;
    }
400561
private function getCurrentPath()
    {
        if (is_null($this->currentPath)) {
            $this->currentPath = $this->str($this->httpRequest()->getCurrentUrl(true)->getPath());
        }

        return $this->currentPath;
    }
1010922
public function getBasePath()
    {
        return (!empty($this->config['General']['base_path'])
                && !empty($this->config['General']['use_base_path']))
            ? $this->config['General']['base_path'] : null;
    }
410282
public function getBasePath()
    {
        if (null === $this->_basePath) {
            $class = Unit::getReflectionClass($this);
            $this->_basePath = dirname($class->getFileName());
        }
        return $this->_basePath;
    }
332673
public function getBasePath()
    {
        //
        if ($this->resolvePath && $this->resolvePath instanceof \Closure) {
            $pathHandler = $this->resolvePath;
            $this->basePath = $pathHandler($this->basePath);
        }

        return $this->basePath;
    }