Get/Set the BasePath for the Module
@param string $basePath
@return string|self
193679
public function basePath($basePath = null)
    {
        if (null === $basePath) {
            return $this->basePath;
        }

        $this->basePath = $basePath;
        return $this;
    }
395427
public function setViewPath(string $basePath): self
    {
        $this->viewPath = $basePath;

        if (substr($this->viewPath, -1) != '/') {
            $this->viewPath .= '/';
        }

        return $this;
    }
841748
public function basePath($path = '')
    {
        return $this->getFilesystem()->dirname($this->path()) . ($path ? DIRECTORY_SEPARATOR . $path : $path);
    }
295055
public function getRoutesPath($basePath = null)
    {
        $routes = $this->get('routes');
        if (empty($routes)) {
            // Fallback to default
            return $basePath . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'routes' . DIRECTORY_SEPARATOR . 'main.php';
        }

        return $basePath . DIRECTORY_SEPARATOR . $routes['base_dir'] . DIRECTORY_SEPARATOR . $routes['base_file'];
    }
1117525
private function getPath($path)
    {
        if ($this->basePath === '' || strpos($path, $this->basePath) === 0) {
            $path = substr($path, strlen($this->basePath)) ?: '';
        }

        return $path === '' ? '/' : $path;
    }
857879
public function dump($basepath)
    {
        foreach ($this->sitemapDumpers as $sitemapDumper) {
            if (is_array($this->languages)) {
                foreach ($this->languages as $language) {
                    $sitemapDumper->dump($basepath, $language);
                }
            } else {
                $sitemapDumper->dump($basepath);
            }
        }

        return $this;
    }
644826
public function setBasePath($path)
    {
        if (!is_string($path)) {
            throw new InvalidArgumentException(
                'Path must be a string'
            );
        }

        // Can not be empty
        if ($path == '') {
            throw new InvalidArgumentException(
                'Path can not be empty'
            );
        }

        $this->basePath = $path;
        return $this;
    }
91627
public static function getLanguagePath($basePath = JPATH_ROOT, $language = null)
	{
		$dir = $basePath . '/language';

		if (!empty($language))
		{
			$dir .= '/' . $language;
		}

		return $dir;
	}
868225
public function getBaseFolder( $path = null )
    {

        if ( $path ) {
            return sprintf( '%s/%s', $this->baseFolder, $path );
        }

        return $this->baseFolder;
    }
1305109
public static function base($path = '')
    {
        // Check for cached version of base path
        if (null !== self::$base) {
            return self::$base . $path;
        }

        if (isset($_SERVER['HTTP_HOST'])) {
            $base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';
            $base_url .= '://' . $_SERVER['HTTP_HOST'];
            $base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
            self::$base = $base_url;

            return $base_url . $path;
        }
        return '';
    }
444718
public function getRequestedRoute($basepath)
    {
        if ($basepath == '/') {
            $url = strtolower($_SERVER['REQUEST_URI']);
        } else {
            $url = explode($basepath, strtolower($_SERVER['REQUEST_URI']))[1];
        }

        return $this->_router->getRoute($url);
    }
478538
public function setBasePath($path) {
		$path = realpath($path);
		
		if ($path === false) {
			throw new NoPath('Path does not exists or is not accessible');
		}
		
		$this->basePath = rtrim($path, DIRECTORY_SEPARATOR);
		
		return $this;
	}
573293
public function setBasePath( string$basePath ):self
	{
		$this->basePath= '/'===substr($basePath,-1) ? substr($basePath,0,-1) : $basePath;

		return $this;
	}
243953
public function getViewsPath($basePath = null)
    {
        $views = $this->get('views');
        if (empty($views)) {
            // Fallback to default
            return $basePath . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'views';
        }

        return $basePath . DIRECTORY_SEPARATOR . $views['base_dir'];
    }
1308464
public function basePath(?string $basePath = null) {
        if ($basePath != null) {
            $this->basePath = $basePath;
        }
        return $this->basePath;
    }
899905
public function setBasePath($basePath)
    {
        $this['path.app'] = rtrim($basePath);

        foreach (['config', 'views', 'logs'] as $v) {
            $this['path.' . $v] = realpath(rtrim($basePath) . '/' . $v) . DIRECTORY_SEPARATOR;
        }

        $this['namespace.controller'] = '';

        return $this;
    }
281885
public function findPath($classname, $basepath = null)
    {
        $path = false;

        $word = preg_replace('/(?<=\\w)([A-Z])/', ' \\1', $classname);
        $parts = explode(' ', $word);

        // If class start with a 'An' it is a anahita framework class and we handle it
        if (array_shift($parts) == $this->_prefix) {
            $path = strtolower(implode('/', $parts));

            if (count($parts) == 1) {
                $path = $path.'/'.$path;
            }

            if (!is_file($this->_basepath.'/'.$path.'.php')) {
                $path = $path.'/'.strtolower(array_pop($parts));
            }

            $path = $this->_basepath.'/'.$path.'.php';
        }

        return $path;
    }