Getting the list of port forwarding
@throws \Exception
@return models\NAT\PortForwardingConfig[]
489387
public function getAll(){
        $rest = $this->getService( self::API_NAT_REDIR);
        $rest->GET();

        return $rest->getResultAsArray( models\NAT\PortForwardingConfig::class);
    }
334005
public function getBrowsableInterfaces(){
        $rest = $this->getService( self::API_LAN_BROWSER_INTERFACES);
        $rest->GET();

        return $rest->getResultAsArray( models\LAN\LanInterface::class);
    }
653320
public function getAll(){
        $rest = $this->getService( self::API_NAT_INCOMING);
        $rest->GET();

        return $rest->getResultAsArray( models\NAT\IncomingPortConfig::class);
    }
452965
public function getIPs()
	{
		(isset($_SERVER['HTTP_CLIENT_IP'])) ? $httpClientIp = $_SERVER['HTTP_CLIENT_IP'] : $httpClientIp = Null;
		(isset($_SERVER['REMOTE_ADDR'])) ? $remoteAddr = $_SERVER['REMOTE_ADDR'] : $remoteAddr = Null;
		(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $httpForwardedFor = $_SERVER['HTTP_X_FORWARDED_FOR'] : $httpForwardedFor = Null;
		$allIPs = array( $httpClientIp, $remoteAddr, $httpForwardedFor );
		$IPs 		= $this->checkIPs($allIPs);
		return $IPs;
	}
87751
public function scanPortRange() {
        if (strtolower($this->typePort) == 'tcp') {
            $hostIp = $this->hostIP;
        } else if (strtolower($this->typePort) == 'udp') {
            $hostIp = "udp://$this->hostIP";
        } else {
            throw new \Exception('Port Type undefined!');
        }

        $errno = $errstr = null;
        for ($portNumber = $this->startPort; $portNumber <= $this->endPort; $portNumber++) {
            $handle = @fsockopen($hostIp, $portNumber, $errno, $errstr, $this->timeout);
            if ($handle) {
                $service = $this->getService($portNumber, strtolower($this->typePort));
                $this->openPorts[$portNumber] = (!empty($service)) ? $service : null;
                fclose($handle);
            }
        }
        return $this->openPorts;
    }
1305517
public function getRedirections(){
        $rest = $this->getService( self::API_UPNP_IGD_REDIRECTION);
        $rest->GET();

        return $rest->getResultAsArray( models\UPnP\UpnpIgdRedirection::class);
    }
885920
protected function getOrderedByDistanceAsc(): array
    {
        $values = $this->getIndexedValues();
        uksort($values, function ($oneDistanceInMeters, $anotherDistanceInMeters) {
            /** @noinspection ExceptionsAnnotatingAndHandlingInspection */
            $oneDistanceInMeters = ToFloat::toPositiveFloat($oneDistanceInMeters);
            /** @noinspection ExceptionsAnnotatingAndHandlingInspection */
            $anotherDistanceInMeters = ToFloat::toPositiveFloat($anotherDistanceInMeters);

            return $oneDistanceInMeters <=> $anotherDistanceInMeters; // lowest first
        });

        return $values;
    }
1291632
protected function getServerInitConfig()
    {
        return [
            'host'      => isset($this->config['host']) ? $this->config['host'] : '0.0.0.0',
            'port'      => isset($this->config['port']) ? $this->config['port'] : 8080,
            'sockType'  => isset($this->config['sockType']) ? (SWOOLE_SOCK_UDP | $this->config['sockType']) : SWOOLE_SOCK_UDP,
            'mode'      => isset($this->config['mode']) ? $this->config['mode'] : SWOOLE_PROCESS,
        ];
    }
103305
private function getHttpClientConfig()
    {
        $config = [
            'base_uri' => 'http://ip-api.com/',
            'headers' => [
                'User-Agent' => 'Laravel-GeoIP',
            ],
            'query' => [
                'fields' => 16895,
            ],
        ];

        // Using the Pro service
        if ($this->getOption('key')) {
            $config['base_uri']     = $this->isSecure() ? 'https://pro.ip-api.com/' : 'http://pro.ip-api.com/';
            $config['query']['key'] = $this->getOption('key');
        }

        return $config;
    }
568281
public function getSockets() {
        $sockets = array();
        $servers = Mage::helper('turpentine/data')->cleanExplode(PHP_EOL,
            Mage::getStoreConfig('turpentine_varnish/servers/server_list'));
        $key = str_replace('\n', PHP_EOL,
            Mage::getStoreConfig('turpentine_varnish/servers/auth_key'));
        $version = Mage::getStoreConfig('turpentine_varnish/servers/version');
        if ($version == 'auto') {
            $version = null;
        }
        foreach ($servers as $server) {
            $parts = explode(':', $server);
            $sockets[] = $this->getSocket($parts[0], $parts[1], $key, $version);
        }
        return $sockets;
    }
1313421
protected function getMigrationsFilteredByConnection(): array
	{
		$migrations = $this->findMigrations();

		$connectionName = $this->getConnectionName();

		$defaultConnectionName = $this->getDefaultConnectionName();

		foreach($migrations as $key => $migration)
		{
			$migrationConnectionName = (new ReflectionClass($this->getFullyQualifiedMigration($migration)))
			->newInstanceWithoutConstructor()
			->getConnectionName() ?? $defaultConnectionName;

			if($connectionName !== $migrationConnectionName)
			{
				unset($migrations[$key]);
			}
		}

		return $migrations;
	}
810170
public function getTrustedHeaders()
    {
        $trustedHeaders = Http::getConfig()->TrustedHeaders;

        return [
            'client_ip'    => $trustedHeaders->get('client_ip', self::HEADER_CLIENT_IP),
            'client_host'  => $trustedHeaders->get('client_host', self::HEADER_CLIENT_HOST),
            'client_proto' => $trustedHeaders->get('client_proto', self::HEADER_CLIENT_PROTO),
            'client_port'  => $trustedHeaders->get('client_port', self::HEADER_CLIENT_PORT),
        ];
    }
1266374
public function getConnectionHandlersAsArray()
    {

        // initialize the array for the connection handlers
        $connectionHandlers = array();

        // iterate over the connection handler nodes and sort them into an array
        /** @var \AppserverIo\Appserver\Core\Api\Node\ConnectionHandlerNode $connectionHandler */
        foreach ($this->getConnectionHandlers() as $connectionHandler) {
            $connectionHandlers[$connectionHandler->getUuid()] = $connectionHandler->getType();
        }

        // return the array
        return $connectionHandlers;
    }
42802
public function getRoutes()
    {
        $list = array();

        foreach (glob(__DIR__ . '/config/commands/*.php') as $file) {

            $command = pathinfo($file, PATHINFO_FILENAME);
            $list[$command] = gplcart_config_get($file);

            $method = $command;
            $parts = explode('-', $command);

            if (count($parts) > 1) {
                $method = array_pop($parts);
            }

            $class_name = implode('', $parts);

            $list[$command]['handlers']['controller'] = array(
                "gplcart\\modules\\cli\\controllers\\commands\\$class_name", "cmd$method$class_name");
        }

        return $list;
    }
791073
public function getConfig()
    {
        return [
            'cluster' => Config::get('database.redis.cluster'),
            'default' => [
                'host' => $this->HAClient->getIpAddress(),
                'port' => $this->HAClient->getPort(),
                'password' => Config::get('database.redis.password', null),
                'database' => Config::get('database.redis.database', 0),
            ]
        ];
    }
1049065
public function getRoutes() : array {
        $request = get_request();
        $requestMethod = $request->method();
        $requestPathParts = $request->pathParts();
        $routesIndex = $this->routesIndex;
        $routes = [];
        $this->getRoutesFromIndex($routes,$routesIndex, $requestMethod, $requestPathParts);
        return $routes;
    }
697235
public function getRoutes()
    {
        $manager = RBACHelper::getAuthManager();
        $routes = $this->getAppRoutes();
        $exists = [];
        foreach (array_keys($manager->getPermissions()) as $name) {
            if ($name[0] !== '/') {
                continue;
            }
            $exists[] = $name;
            unset($routes[$name]);
        }
        return [
            'avaliable' => array_keys($routes),
            'assigned' => $exists
        ];
    }