Obtain information about the server

- Date/Time Formatting Patterns
- Edition
- Version
- Build
- Features
- License type and expiration

@return array
544780
public function serverInfo()
    {
        $url = $this->service_url . '/serverInfo';
        $data = $this->service->prepAndSend($url, array(200), 'GET', null, true, 'application/json', 'application/json');
        return json_decode($data, true);
    }
610219
public function getInfo() {
		$info = $this->createInfoset();
		
		$elapsed = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'];
		
		$info->setIcon('clock')
		     ->setName('Execution time')
		     ->setTitle($this->formatTime($elapsed));
		
		return $info;
	}
1309134
public function get_server_info() {
        static $info;
        if (!$info) {
            $this->query_start("--pg_version()", null, SQL_QUERY_AUX);
            $info = pg_version($this->pgsql);
            $this->query_end(true);
        }
        return array('description'=>$info['server'], 'version'=>$info['server']);
    }
956050
private function get_api_versions() {

		$cache_key      = $this->product->get_key() . '_' . preg_replace( '/[^0-9a-zA-Z ]/m', '', $this->product->get_version() ) . 'versions';
		$cache_versions = get_transient( $cache_key );
		if ( false === $cache_versions ) {
			$versions = $this->get_remote_versions();
			set_transient( $cache_key, $versions, 5 * DAY_IN_SECONDS );
		} else {
			$versions = is_array( $cache_versions ) ? $cache_versions : array();
		}

		return $versions;
	}
303242
public function info()
    {
        return [
            'gerrit' => [
                'hostUri' => $this->hostUri,
                'gerritProject' => $this->gerritProject,
                'revisionId' => $this->revisionId,
                'aliasContext' => $this->aliasContext->info()
            ]
        ];
    }
1111913
public function getGeneralSettings()
    {
        return [
            'guard' => [
                'path' => '/config/auth.php',
                'search' => "'guards' => [",
                'stub' => __DIR__ . '/../stubs/config/guards.stub',
                'prefix' => false,
            ],
            'provider' => [
                'path' => '/config/auth.php',
                'search' => "'providers' => [",
                'stub' => __DIR__ . '/../stubs/config/providers.stub',
                'prefix' => false,
            ],
            'passwords' => [
                'path' => '/config/auth.php',
                'search' => "'passwords' => [",
                'stub' => __DIR__ . '/../stubs/config/passwords.stub',
                'prefix' => false,
            ],
            'kernel' => [
                'path' => '/app/Http/Kernel.php',
                'search' => 'protected $routeMiddleware = [',
                'stub' => __DIR__ . '/../stubs/Middleware/Kernel.stub',
                'prefix' => false,
            ],
            'map_register' => [
                'path' => '/app/Providers/RouteServiceProvider.php',
                'search' => '$this->mapWebRoutes();',
                'stub' => __DIR__ . '/../stubs/routes/map-register.stub',
                'prefix' => false,
            ],
            'map_method' => [
                'path' => '/app/Providers/RouteServiceProvider.php',
                'search' => "    /**\n" . '     * Define the "web" routes for the application.',
                'stub' => __DIR__ . '/../stubs/routes/map-method.stub',
                'prefix' => true,
            ],
        ];
    }
1108169
public function info()
    {
        $data = [
            'description' => [
                'value' => $this->description
            ]
        ];
        if ($this->attributes) {
            $data['attributes'] = $this->attributes->info();
        }

        return [
            'time' => $this->time,
            'annotation' => $data
        ];
    }
929593
public function getFormats(): array {
        $meta    = $this->getMetadata();
        $formats = array();
        foreach ($meta->all(RC::get('fedoraServiceRetFormatProp')) as $i) {
            $formats[] = new Format((string) $i);
        }
        return $formats;
    }
936200
protected function getBasePingData()
    {
        return [
            'key' => $this->key,
            'nbPlayers' => count($this->playerStorage->getOnline()),
            'country' => $this->countries->getIsoAlpha2FromName($this->countries->parseCountryFromPath($this->gameData->getServerPath())),
            'version' => Application::EXPANSION_VERSION,
            'php_version' => $this->gameData->getServerCleanPhpVersion(),
            'php_version_short' => $this->gameData->getServerMajorPhpVersion(),
            'mysql_version' => 'unknown',
            'memory' => memory_get_usage(),
            'memory_peak' => memory_get_peak_usage(),
            'title' => str_replace('@','_by_', $this->gameData->getVersion()->titleId),
            'game' => $this->gameData->getTitleGame(),
            'mode' => strtolower($this->gameData->getGameInfos()->scriptName),
            'serverOs' => $this->gameData->getServerOs(),
        ];
    }
651057
public function getStatus() : array
    {

        return [
            'status'        => $this->engine->getStats(),
            'version'       => $this->engine->getVersion(),
            'server_list'   => $this->engine->getServerList()
        ];
    }
1033814
public function getSearchedVersions()
    {
        $versions = array();
        
        if (!empty($_REQUEST['Versions'])) {
            if (is_array($_REQUEST['Versions'])) {
                $versions = Convert::raw2att($_REQUEST['Versions']);
                $versions = array_combine($versions, $versions);
            } else {
                $version = Convert::raw2att($_REQUEST['Versions']);
                $versions[$version] = $version;
            }
        }

        return $versions;
    }
23971
public function getExpires(): ?\DateTimeInterface
    {
        try {
            return $this->headers->getDate('Expires');
        } catch (\RuntimeException $e) {
            // according to RFC 2616 invalid date formats (e.g. "0" and "-1") must be treated as in the past
            return \DateTime::createFromFormat('U', time() - 172800);
        }
    }
613452
public function getTimezonesList()
    {
        if (!SettingsServer::isTimezoneSupportEnabled()) {
            return array('UTC' => $this->getTimezonesListUTCOffsets());
        }

        $countries = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider')->getCountryList();

        $return = array();
        $continents = array();
        foreach ($countries as $countryCode => $continentCode) {
            $countryCode = strtoupper($countryCode);
            $timezones = DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, $countryCode);
            foreach ($timezones as $timezone) {
                if (!isset($continents[$continentCode])) {
                    $continents[$continentCode] = Piwik::translate('Intl_Continent_' . $continentCode);
                }
                $continent = $continents[$continentCode];

                $return[$continent][$timezone] = $this->getTimezoneName($timezone, $countryCode, count($timezones) > 1);
            }
        }

        // Sort by continent name and then by country name.
        ksort($return);
        foreach ($return as $continent => $countries) {
            asort($return[$continent]);
        }

        $return['UTC'] = $this->getTimezonesListUTCOffsets();
        return $return;
    }
968721
protected function _formatters() {
		$datetime = $timestamp = function($format, $value) {
			if ($format && (($time = strtotime($value)) !== false)) {
				$val = date($format, $time);
				if (!preg_match('/^' . preg_quote($val) . '\.\d+$/', $value)) {
					$value = $val;
				}
			}
			return $this->connection->quote($value);
		};

		return compact('datetime', 'timestamp') + [
			'boolean' => function($value) {
				return $this->connection->quote($value ? 't' : 'f');
			}
		] + parent::_formatters();
	}
75271
protected function getCommonDefaults()
    {
        return [
            'widget' => 'single_text',
            'datepicker_use_button' => true,
            'dp_pick_time' => true,
            'dp_pick_date' => true,
            'dp_use_current' => true,
            'dp_min_date' => '1/1/1900',
            'dp_max_date' => null,
            'dp_show_today' => true,
            'dp_language' => $this->locale,
            'dp_default_date' => '',
            'dp_disabled_dates' => [],
            'dp_enabled_dates' => [],
            'dp_icons' => [
                'time' => 'fa fa-clock-o',
                'date' => 'fa fa-calendar',
                'up' => 'fa fa-chevron-up',
                'down' => 'fa fa-chevron-down',
            ],
            'dp_use_strict' => false,
            'dp_side_by_side' => false,
            'dp_days_of_week_disabled' => [],
            'dp_collapse' => true,
            'dp_calendar_weeks' => false,
            'dp_view_mode' => 'days',
            'dp_min_view_mode' => 'days',
        ];
    }
375126
public function getFormats()
    {
        $allFormats = array();

        foreach ($this->loaderIds as $id => $formats) {
            foreach ($formats as $format) {
                if ('database' !== $format) {
                    $allFormats[] = $format;
                }
            }
        }

        return $allFormats;
    }
663761
protected function getPlatformInfo()
    {
        $db = $this->get('database_connection');

        $data = [];
        $data[] = [
            'title' => 'Smart Core CMS version',
            'value' => CMSAppKernel::VERSION,
            'required' => '',
            'recomended' => '',
            'hint' => '',
            'warning' => 0,
        ];
        $isDebug = $this->get('kernel')->isDebug() ? 'true' : 'false';
        $data[] = [
            'title' => 'Symfony Framework version',
            'value' => Kernel::VERSION.' (debug = '.$isDebug.')',
            'required' => '',
            'recomended' => '',
            'hint' => '',
            'warning' => 0,
        ];
        $data[] = [
            'title' => 'Database server',
            'value' => $db->query('SHOW VARIABLES LIKE "%version_comment%"')->fetchObject()->Value.' version '.$db->query('SELECT version() AS version')->fetchObject()->version,
            'required' => 'MySQL 5.1',
            'recomended' => 'MySQL 5.5+ or PostgreSQL 9.3+',
            'hint' => '',
            'warning' => 0,
        ];
        $data[] = [
            'title' => 'Web Server',
            'value' => $_SERVER['SERVER_SOFTWARE'].' ('.php_sapi_name().')',
            'required' => '',
            'recomended' => '',
            'hint' => '',
            'warning' => 0,
        ];

        return $data;
    }