getMetaEnvironments.

@author Rasmus Ebbesen <re@nodes.dk>

@static

@return array
358307
public static function getMetaEnvironments()
    {
        return array_merge([
            self::ENV_LOCAL,
            self::ENV_DEVELOPMENT,
            self::ENV_STAGING,
            self::ENV_PRODUCTION,
        ], config('nodes.meta.environments', []));
    }
1280552
public function getMeta()
    {
        $result = [
            'latitude' => $this->latitude,
            'longitude' => $this->longitude,
            'timezone' => ($this->date->getTimezone())->getName(),
            'method' => $this->methods[$this->method],
            'latitudeAdjustmentMethod' => $this->latitudeAdjustmentMethod,
            'midnightMode' => $this->midnightMode,
            'school' => $this->school,
            'offset' => $this->offset,
        ];
        if (isset($result['method']['offset'])) {
            unset($result['method']['offset']);
        }

        return $result;
    }
389304
protected function getConfigTree(): array
    {
        $tree = [$this->getConfig()];
        $parent = $this->container;
        while ($parent = $parent->getParent()) {
            $tree[] = $parent->getConfig()->getConfig();
        }

        return $tree;
    }
251433
public function getEnvironmentsForCheckout()
    {
        $project = $this->getWelcomeCommand()->getCurrentProject();
        if (!$project) {
            return [];
        }
        try {
            $currentEnvironment = $this->getWelcomeCommand()->getCurrentEnvironment($project, false);
        } catch (\Exception $e) {
            $currentEnvironment = false;
        }
        $environments = $this->api->getEnvironments($project, false, false);
        if ($currentEnvironment) {
            $environments = array_filter(
                $environments,
                function ($environment) use ($currentEnvironment) {
                    return $environment->id !== $currentEnvironment->id;
                }
            );
        }

        return array_keys($environments);
    }
287557
public function managerGetRealms()
    {
        $theRealms = [];

        foreach ($this->realmManager->getRealms() as $realm) {
            /* @var $realm \Thruway\Realm */
            $theRealms[] = [
                'name' => $realm->getRealmName()
            ];
        }

        return [$theRealms];
    }
1139933
public function validTargetEnvironments() {
		$archive = $this;
		$envs = $this->Environment()->Project()->DNEnvironmentList()
			->filterByCallback(function($item) use ($archive) {
				return $archive->EnvironmentID!=$item->ID && $archive->canMoveTo($item);
			});

		return $envs;
	}
1252429
public static function GetClientIpEnvironnement() {
        $ipaddress = '';
        if (getenv('HTTP_CLIENT_IP'))
            $ipaddress = getenv('HTTP_CLIENT_IP');
        else if (getenv('HTTP_X_FORWARDED_FOR'))
            $ipaddress = getenv('HTTP_X_FORWARDED_FOR');
        else if (getenv('HTTP_X_FORWARDED'))
            $ipaddress = getenv('HTTP_X_FORWARDED');
        else if (getenv('HTTP_FORWARDED_FOR'))
            $ipaddress = getenv('HTTP_FORWARDED_FOR');
        else if (getenv('HTTP_FORWARDED'))
            $ipaddress = getenv('HTTP_FORWARDED');
        else if (getenv('REMOTE_ADDR'))
            $ipaddress = getenv('REMOTE_ADDR');
        else
            $ipaddress = 'UNKNOWN';

        return $ipaddress;
    }
1092855
protected function getEnvironments()
    {
        $env = [];

        $container = new Container('melisinstaller');
        if (isset($container['environments']) && isset($container['environments']['new'])) {
            $env = $container['environments']['new'];
        }

        return $env;
    }
1184150
private function getEnvironmentVariables()
    {
        // Initialize from globals, allow override of special keys via putenv calls.
        $variables = $this->inheritEnvironment
            ? array_replace($_ENV, $_SERVER, $this->environment)
            : $this->environment;

        foreach (array_keys($variables) as $name) {
            if (false !== ($value = getenv($name))) {
                $variables[$name] = $value;
            }
        }

        return $variables;
    }
1160415
private function getEnvironment()
  {
    $env = new \Dotenv\Dotenv($this->basePath);
    $env->load();
    $this->env['env'] = getenv('APP_ENV');
    $this->env['debug'] = getenv('APP_DEBUG');
    $this->env['appSecret'] = getenv('APP_KEY');
  }
474190
public function getSiteEnvironmentsAction()
    {
        $json = array();
        $siteId = (int) $this->params()->fromQuery('siteId');
        
        $domainTable = $this->getServiceLocator()->get('MelisCoreTablePlatform');
        $domainData = $domainTable->fetchAll();
        $domainData = $domainData->toArray();
        
        if($domainData) {
            foreach($domainData as $domainValues) {
                $json[] = $domainValues['plf_name'];
            }
        }
        
        return new JsonModel(array('data' => $json));
    }
509468
public static function EnvironmentDetectByIps () {
		if (static::$environment === NULL) {
			$request = & \MvcCore\Application::GetInstance()->GetRequest();
			$serverAddress = $request->GetServerIp();
			$remoteAddress = $request->GetClientIp();
			if ($serverAddress == $remoteAddress) {
				static::$environment = static::ENVIRONMENT_DEVELOPMENT;
			} else {
				static::$environment = static::ENVIRONMENT_PRODUCTION;
			}
		}
		return static::$environment;
	}
70573
protected function getEntityMetaData()
    {
        return [
            $this->getEntityManager()->getMetadataFactory()->getMetadataFor('\JaztecAcl\Entity\Acl\Privilege'),
            $this->getEntityManager()->getMetadataFactory()->getMetadataFor('\JaztecAcl\Entity\Monitor\RequestedPrivilege'),
            $this->getEntityManager()->getMetadataFactory()->getMetadataFor('\JaztecAcl\Entity\Acl\Resource'),
            $this->getEntityManager()->getMetadataFactory()->getMetadataFor('\JaztecAcl\Entity\Acl\Role'),
            $this->getEntityManager()->getMetadataFactory()->getMetadataFor('\JaztecAcl\Entity\Auth\User'),
            $this->getEntityManager()->getMetadataFactory()->getMetadataFor('\JaztecAcl\Entity\Monitor\AclRequest'),
        ];
    }
138215
public function getRevManifest(): array {
        if (is_null(self::$_revManifest)) {
            $manifestPath = APPLICATION_PATH . '/../rev-manifest-' . APPLICATION_ENV . '.json';
            self::$_revManifest = file_exists($manifestPath)
                ? json_decode(file_get_contents($manifestPath), true)
                : [];
        }
        return self::$_revManifest;
    }
1046655
protected function getEnvironment() {
		$projectName = $this->getRequest()->param('Project');
		$project = DNProject::get()->filter('Name', $projectName)->first();
		$environmentName = $this->getRequest()->param('Environment');
		return $project->Environments()->filter('Name', $environmentName)->first();
	}
1157102
public function getTreeNodeStates()
    {
        if (!isset($this->nodeStates)) {
            $environment      = $this->getEnvironment();
            $sessionStorage   = $environment->getSessionStorage();
            $this->nodeStates = new TreeNodeStates(
                $sessionStorage->get($this->getToggleId()),
                $this->determineParentsOfValues()
            );

            // Maybe it is not the best location to do this here.
            if ('all' === $environment->getInputProvider()->getParameter('ptg')) {
                // Save in session and reload.
                $sessionStorage->set(
                    $this->getToggleId(),
                    $this->nodeStates->setAllOpen($this->nodeStates->isAllOpen())->getStates()
                );

                $environment->getEventDispatcher()->dispatch(ContaoEvents::CONTROLLER_RELOAD, new ReloadEvent());
            }
        }

        return $this->nodeStates;
    }
1029553
public function findAll()
    {
        $virtualHostNodes = array();
        foreach ($this->getSystemConfiguration()->getContainers() as $containerNodes) {
            foreach ($containerNodes->getServers() as $serverNode) {
                foreach ($serverNode->getVirtualHosts() as $virtualHostNode) {
                    $virtualHostNodes[$virtualHostNode->getPrimaryKey()] = $virtualHostNode;
                }
            }
        }
        return $virtualHostNodes;
    }