Get Informations on the FastCGI application

@param array $requestedInfo information to retrieve
@return array
160481
public function getValues(array $requestedInfo)
    {
        $this->connect();

        $request = '';
        foreach ($requestedInfo as $info) {
            $request .= $this->buildNvpair($info, '');
        }
        fwrite($this->_sock, $this->buildPacket(self::GET_VALUES, $request, 0));

        $resp = $this->readPacket();
        if ($resp['type'] == self::GET_VALUES_RESULT) {
            return $this->readNvpair($resp['content'], $resp['length']);
        } else {
            throw new \Exception('Unexpected response type, expecting GET_VALUES_RESULT');
        }
    }
910982
public function getRevScanInfo(){
        if (isset($this->_receive['ScanCodeInfo'])){
            if (!is_array($this->_receive['SendPicsInfo'])) {
                $array=(array)$this->_receive['ScanCodeInfo'];
                $this->_receive['ScanCodeInfo']=$array;
            }else {
                $array=$this->_receive['ScanCodeInfo'];
            }
        }
        if (isset($array) && count($array) > 0) {
            return $array;
        } else {
            return false;
        }
    }
366137
public function getUserInformation()
    {
        $deferred = new Deferred();

        $this->http->get(Options::replace(Endpoints::USER_INFO, ['id' => $this->userInfo['userId']]))->then(function ($json) use ($deferred) {
            $deferred->resolve($json);
        }, function ($e) use ($deferred) {
            $deferred->reject($e);
        });

        return $deferred->promise();
    }
315837
public function get_groups_info() {

        if ($this->cachegroups !== null) {
            return $this->cachegroups;
        }

        $groups = [];

        foreach (core_filetypes::get_types() as $ext => $info) {
            if (isset($info['groups']) && is_array($info['groups'])) {
                foreach ($info['groups'] as $group) {
                    if (!isset($groups[$group])) {
                        $groups[$group] = (object) [
                            'extensions' => [],
                            'mimetypes' => [],
                        ];
                    }
                    $groups[$group]->extensions['.'.$ext] = true;
                    if (isset($info['type'])) {
                        $groups[$group]->mimetypes[$info['type']] = true;
                    }
                }
            }
        }

        foreach ($groups as $group => $info) {
            $info->extensions = array_keys($info->extensions);
            $info->mimetypes = array_keys($info->mimetypes);
        }

        $this->cachegroups = $groups;
        return $this->cachegroups;
    }
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) 
		);
	}
240519
public static function getIndexes($underlyingQueryInfo)
    {
        // These indexes are 0-based for Solr & PHP. The user visible numbering is 1-based.
        $index = [];
        $index['positionIndex'] = $underlyingQueryInfo['position'] - 1;
        $index['previousIndex'] = max([$index['positionIndex'] - 1, 0]);
        $index['nextIndex'] = $index['positionIndex'] + 1;
        $index['resultIndexOffset'] = (0 === $index['positionIndex']) ? 0 : 1;

        return $index;
    }
416360
protected function getConfig($requestedName, ServiceLocatorInterface $services)
    {
        if ($this->configKey) {
            $config = $services->get('Config');
            if (!empty($config[$this->configKey][$requestedName])
                && is_array($config[$this->configKey][$requestedName])
            ) {
                return $config[$this->configKey][$requestedName];
            }
        }

        return [];
    }
1253922
protected function analyzeAsRequest(string $requestOrigin): array
	{
		$headers = [];

		// #6.1.3
		$headers['Access-Control-Allow-Origin'] = $requestOrigin;
		if ($this->settings[self::KEY_IS_USING_CREDENTIALS]) {
			$headers['Access-Control-Allow-Credentials'] = 'true';
		}
		// #6.4
		$headers['Vary'] = 'Origin';

		// #6.1.4
		$exposedHeaders = $this->getEnabledItems($this->settings[self::KEY_EXPOSED_HEADERS]);
		if (!empty($exposedHeaders)) {
			$headers['Access-Control-Expose-Headers'] = $exposedHeaders;
		}

		return $this->result(self::TYPE_ACTUAL_REQUEST, $headers);
	}
161607
public function retrieveAll($raw = false)
    {
        if ($cache = $this->loadCache()) {
            if (!$raw) {
                $results = [];
                foreach ($cache as $key => $value) {
                    $results[$key] = unserialize($value['data']);
                }
                return $results;
            } else {
                return $cache;
            }
        }
        return null;
    }
721354
public static function getPublicInfo()
    {
        if (empty(session('user'))) {
            throw new UnauthorizedException('There is no valid session for the current request.');
        }

        $sessionData = [
            'session_token'   => session('session_token'),
            'session_id'      => session('session_token'), // temp for compatibility with 1.x
            'id'              => session('user.id'),
            'name'            => session('user.display_name'),
            'first_name'      => session('user.first_name'),
            'last_name'       => session('user.last_name'),
            'email'           => session('user.email'),
            'is_sys_admin'    => session('user.is_sys_admin'),
            'last_login_date' => session('user.last_login_date'),
            'host'            => gethostname()
        ];

        $role = static::get('role');
        if (!session('user.is_sys_admin') && !empty($role)) {
            $sessionData['role'] = array_get($role, 'name');
            $sessionData['role_id'] = array_get($role, 'id');
        }

        return $sessionData;
    }
1332120
public function get($itemsToGet = 0, $offset = 0)
    {
        $pages = [];
        if ($this->getQuery() == '') {
            $this->setBaseQuery();
        }

        $this->setItemsPerPage($itemsToGet);

        $r = parent::get($itemsToGet, $offset);
        foreach ($r as $row) {
            $nc = $this->loadPageID($row['cID'], 'ACTIVE');
            if (!$this->displayOnlyApprovedPages) {
                $cp = new Permissions($nc);
                if ($cp->canViewPageVersions()) {
                    $nc->loadVersionObject('RECENT');
                }
            }
            $nc->setPageIndexScore($row['cIndexScore']);
            $pages[] = $nc;
        }

        return $pages;
    }
478825
private function getAllInfo()
    {
        $data = [
            'username'       => $this->getUsername(),
            'image'          => $this->getImage(),
            'last_online'    => $this->getStatus('Last Online'),
            'gender'         => $this->getStatus('Gender'),
            'birthday'       => $this->getStatus('Birthday'),
            'location'       => $this->getStatus('Location'),
            'joined_date'    => $this->getStatus('Joined'),
            'forum_post'     => $this->getStatus2(0),
            'review'         => $this->getStatus2(1),
            'recommendation' => $this->getStatus2(2),
            'blog_post'      => $this->getStatus2(3),
            'club'           => $this->getStatus2(4),
            'sns'            => $this->getSns(),
            'friend'         => $this->getFriend(),
            'about'          => $this->getAbout(),
            'anime_stat'     => $this->getStat('anime'),
            'manga_stat'     => $this->getStat('manga'),
            'favorite'       => $this->getFavorite(),
        ];

        return $data;
    }
178227
public function getProviderInfo(): array
    {
        if ($this->info === null) {
            $event = new RegisterProviderInfo();

            $this->trigger(
                $event::REGISTER_INFO,
                $event
            );

            $this->info = $event->info;

            $this->formatInfoArray($this->info);
        }

        return $this->info;
    }
682564
protected function getAllowedMethodsForMatchingRoutes(string $requestPath): array
	{
		$methods = [];

		foreach($this->routes->getRoutes() as $route)
		{
			if($this->matches($route, $requestPath) && $this->constraintsAreSatisfied($route))
			{
				$methods = array_merge($methods, $route->getMethods());
			}
		}

		return array_unique($methods);
	}
249756
public function loadFaqs() : array
    {
        return $this->repository->matching(
            $this->repository->criteria()
                ->orderByAsc(Faq::ORDER_TO_DISPLAY)
        );
    }
427955
public function getLastRequestInformation()
    {
        return array(
            'http_url' => $this->http_url,
            'http_request_headers' => $this->http_request_headers,
            'http_code' => $this->http_code,
            'http_info' => $this->http_info,
            'http_header' => $this->http_header,
            'http_post' => $this->http_post,
        );
    }
1215959
public function getRequireArray($requestPath, array $getData = [])
    {
        $responseData = $this->get($requestPath, $getData);

        return self::requireArray($responseData);
    }