Utility function to obtain PATH_INFO information.

@return string  The PATH_INFO string.
182934
public static function getPathInfo()
    {
        if (isset($_SERVER['PATH_INFO']) &&
            (strpos($_SERVER['SERVER_SOFTWARE'], 'lighttpd') === false)) {
            return $_SERVER['PATH_INFO'];
        } elseif (isset($_SERVER['REQUEST_URI']) &&
                  isset($_SERVER['SCRIPT_NAME'])) {
            $search = Horde_String::common($_SERVER['SCRIPT_NAME'], $_SERVER['REQUEST_URI']);
            if (substr($search, -1) == '/') {
                $search = substr($search, 0, -1);
            }
            $search = array($search);
            if (!empty($_SERVER['QUERY_STRING'])) {
                // We can't use QUERY_STRING directly because URL rewriting
                // might add more parameters to the query string than those
                // from the request URI.
                $url = parse_url($_SERVER['REQUEST_URI']);
                if (!empty($url['query'])) {
                    $search[] = '?' . $url['query'];
                }
            }
            $path = str_replace($search, '', $_SERVER['REQUEST_URI']);
            if ($path == '/') {
                $path = '';
            }
            return $path;
        }

        return '';
    }
42969
public static function getInfos(){
                
                
		//subfolder shall be detected as /SUBFLODERS/tao/install/index.php so we remove the "/extension/module/action" part:
        $subfolder = $_SERVER['REQUEST_URI'];
        $subfolder = preg_replace('/\/(([^\/]*)\/){2}([^\/]*)$/', '', $subfolder);
        $subfolder = preg_replace('/^\//', '', $subfolder);
        
        return array(
			'folder'	=> $subfolder,
			'host'		=> $_SERVER['HTTP_HOST'],
			'https'		=> ($_SERVER['SERVER_PORT'] == 443) 
		);
	}
50807
public function pathinfo($option = null)
    {
        if (null === $option) {
            return pathinfo($this->_filePath);
        }
        return pathinfo($this->_filePath, $option);
    }
1309225
private function getFilePath()
    {
        $fullName = $this->fullName;
        if (substr($fullName, 0, 1) != '/') {
            $fullName = '/' . $fullName;
        }
        return $this->getSetting('storePath') . $fullName;
    }
589769
public function getPathInfo() {
    /** @var TokenNode $first */
    $first = $this->firstChild();
    $absolute = $first->getType() === T_NS_SEPARATOR;
    $relative = $first->getType() === T_NAMESPACE;
    $parts = $this->getParts();
    return [
      'absolute' => $absolute,
      'relative' => $relative,
      'qualified' => !$absolute && count($parts) > 1,
      'unqualified' => !$absolute && count($parts) === 1,
      'parts' => $parts,
    ];
  }
6526
protected function getInformationTargetPath()
    {
        if ($path = array_get($this->config, 'path')) {
            return $path;
        }

        return rtrim($this->getInformationTargetBasePath(), DIRECTORY_SEPARATOR)
             . DIRECTORY_SEPARATOR
             . $this->getInformationTargetRelativePath();
    }
742646
public function info()
    {
        if (!$this->info) {
            $this->info = pathinfo($this->path);
        }
        if (!isset($this->info['filename'])) {
            $this->info['filename'] = $this->name();
        }
        if (!isset($this->info['filesize'])) {
            $this->info['filesize'] = $this->size();
        }
        if (!isset($this->info['mime'])) {
            $this->info['mime'] = $this->mime();
        }

        return $this->info;
    }
288145
protected function gatherInfo() {
        $info = new stdClass();
        $info->contents = $this->contents;
        $info->path = $this->path;
        $info->lastModified = $this->lastModified;

        return $info;
    }
758863
protected static function _pathInfo($path)
    {
        $result = array();

        $filename = realpath($path);

        $result['realpath'] = $filename;
        $result             = array_merge($result, pathinfo($filename));

        $result['type']  = filetype($filename);
        $result['exist'] = file_exists($filename);
        if ($result['exist']) {

            $result['time created']  = filectime($filename) . ' / ' . date(self::DATE_FORMAT, filectime($filename));
            $result['time modified'] = filemtime($filename) . ' / ' . date(self::DATE_FORMAT, filemtime($filename));
            $result['time access']   = fileatime($filename) . ' / ' . date(self::DATE_FORMAT, fileatime($filename));

            $result['group'] = filegroup($filename);
            $result['inode'] = fileinode($filename);
            $result['owner'] = fileowner($filename);
            $perms           = fileperms($filename);

            if (($perms & 0xC000) == 0xC000) { // Socket
                $info = 's';
            } elseif (($perms & 0xA000) == 0xA000) { // Symbolic Link
                $info = 'l';
            } elseif (($perms & 0x8000) == 0x8000) { // Regular
                $info = '-';
            } elseif (($perms & 0x6000) == 0x6000) { // Block special
                $info = 'b';
            } elseif (($perms & 0x4000) == 0x4000) { // Directory
                $info = 'd';
            } elseif (($perms & 0x2000) == 0x2000) { // Character special
                $info = 'c';
            } elseif (($perms & 0x1000) == 0x1000) { // FIFO pipe
                $info = 'p';
            } else { // Unknown
                $info = 'u';
            }

            // owner
            $info .= (($perms & 0x0100) ? 'r' : '-');
            $info .= (($perms & 0x0080) ? 'w' : '-');
            $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x') : (($perms & 0x0800) ? 'S' : '-'));

            // group
            $info .= (($perms & 0x0020) ? 'r' : '-');
            $info .= (($perms & 0x0010) ? 'w' : '-');
            $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x') : (($perms & 0x0400) ? 'S' : '-'));

            // other
            $info .= (($perms & 0x0004) ? 'r' : '-');
            $info .= (($perms & 0x0002) ? 'w' : '-');
            $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x') : (($perms & 0x0200) ? 'T' : '-'));

            $result['perms'] = $perms . ' / ' . $info;

            $result['is_readable'] = is_readable($path);
            $result['is_writable'] = is_writable($path);

            if ($result['type'] == 'file') {

                $size = filesize($filename);

                $result['size'] = $size . ' / ' . self::_formatSize($size);
            }

        } else {
            $result = false;
        }

        return $result;
    }
522651
public function getConnectionString()
    {

        $settings = $this->connectionInfo;
        unset( $settings['search_path'] );

        foreach ($settings as $key => &$value) {
            $value = sprintf(
                "%s='%s'",
                $key,
                $value
            );
        }

        return implode(' ', $settings);

    }
242827
public function getPath(): string
	{
		if($this->path === null)
		{
			$this->path = dirname((new ReflectionClass($this))->getFileName(), 2);
		}

		return $this->path;
	}
1151090
public function getPath() : ?string 
    {
        if ( ! $this->hasPath()) {
            $this->setPath($this->getDefaultPath());
        }
        return $this->path;
    }
1307678
public function pathInfo() {
        $url = $this->url();
        $index = strpos($url, "?");
        if ($index) {
            $url = substr($url, 0, $index);
        }

        return $url;
    }
211959
protected static function getInfo()
    {
        $files = self::getFiles();
        //
        foreach ($files as $path) {
            $data = self::convert(self::readFile($path.'/vinala.json'), $path);
            $data = $data['system'];
            $data['path'] = $path;

            if (array_key_exists('alias', $data)) {
                self::$infos[$data['alias']] = $data;
            } else {
                // die($path."/.info");
            }
        }
        //
        return self::$infos;
    }
768008
protected String getInfo() {
        StringBuffer ret = new StringBuffer();
        if (pathParts != null) {
            ret.append(", path=").append(pathParts);
        }
        if (targetConfig != null) {
            ret.append(", target=").append(targetConfig);
        }
        return ret.length() > 0 ? ret.toString() : null;
    }
773481
public function getPath()
    {
        $sname = '';
        $gname = '';
        $vname = $this->getName();
        if ( $this->getConfigGroup() ) {
            if ( $this->getConfigGroup()->getConfigSection() ) {
                $sname = $this->getConfigGroup()->getConfigSection()->getName();
            }
            $gname = $this->getConfigGroup()->getName();
        }

        return sprintf(
            '%s:%s:%s',
            $sname,
            $gname,
            $vname
        );
    }
686315
public function getUrl()
    {
        if ($this->findDocumentRootInScriptFileName() === $this->removeLastSlash($this->root)) {
            return $this->getRequestUri();
        }
        $path = $this->server->get('PATH_INFO');

        return $path;
    }