Get the domain of the site per its environement

@param string $siteEnv
494739
public function getDataByEnv($siteEnv) 
	{
	    $select = $this->tableGateway->getSql()->select();
	     
	    $select->columns(array('*'));
	    $select->group('melis_cms_site_domain.sdom_env');
	    $select->where(array('sdom_env' => $siteEnv));
	    $resultSet = $this->tableGateway->selectWith($select);
	     
	    return $resultSet;
	}
461984
private function setEnvironmentVariables(array $env)
    {
        foreach ($env as $name => $value) {
            putenv("$name=$value");

            $_ENV[$name] = $value;
            $_SERVER[$name] = $value;
        }
    }
959954
public function getEnvironmentConfiguration(string $name): EnvironmentConfiguration
    {
        if (array_key_exists($name, $this->environmentConfigurations)) {
            return $this->environmentConfigurations[$name];
        }
        throw new DomainException('There is no environment configuration with name' . $name);
    }
814681
protected function path( $name, $env = false )
	{
		$conf = CCPath::get( $name, \CCDIR_CONFIG, static::EXT );
		
		if ( !$env )
		{
			return $conf;
		}
		
		$env_conf = CCPath::get( $name, \CCDIR_CONFIG.ClanCats::environment().'/', static::EXT );
		
		if ( file_exists( $env_conf ) ) 
		{
			return $env_conf;
		}
		
		return $conf;
	}
1194796
public function getKeys($env, $prefix = null)
	{
		$this->validateEnvironment($env);

		$env  = $env === self::APP ? self::EXT : self::APP;
		$keys = array_keys($this->definitions[$env]);

		if ($prefix !== null) {
			$keys = array_map(function ($key) use ($prefix) {
				return $prefix . $key;
			}, $keys);
		}

		return $keys;
	}
17464
function ___GET_ENV_HOSTNAME() {
	try {
		if ( HAS_NODE_BUFFER ) {
			return require( 'os' ).hostname;
		}
		else
		if ( typeof window !== "undefined" ) {
			return window.location.hostname;
		}
		else {
			throw new Error("");
		}
	}
	catch(e) {
		return 'unknown.' + DumpHexStringLE(RandomBytes(32));
	}
}
224760
private function callDelCreaServer(string $env)
    {
        Server::delete(FEnv::get("framework.compiled")."$env/", 'directory');
        Server::create(FEnv::get("framework.compiled")."$env/", 'directory');
    }
1362071
static function getConfiguration(array $env): Configuration {
    $config = new Configuration([
      'commit_sha' => 'HEAD',
      'service_branch' => $env['TRAVIS_BRANCH'] ?? null,
      'service_job_id' => $env['TRAVIS_JOB_ID'] ?? null,
      'service_name' => 'travis-ci'
    ]);

    $pullRequest = $env['TRAVIS_PULL_REQUEST'] ?? null;
    if ($pullRequest && $pullRequest != 'false') $config['service_pull_request'] = $pullRequest;

    return $config;
  }
547872
public function addDomain($site, $env, $domain)
    {
      $variables = array(
        'site' => $site,
        'env' => $env,
        'domain' => $domain,
      );
      $request = $this->post(array('{+base_path}/sites/{site}/envs/{env}/domains/{domain}.json', $variables));
      return new Response\Task($request);
    }
329730
private function downloadPantheonBackup($env) {
    $project_properties = $this->getProjectProperties();
    $terminus_site_env  = $this->getPantheonSiteEnv($env);

    $terminus_url_request = $this->taskExec('terminus backup:get ' . $terminus_site_env . ' --element="db"')
      ->dir($project_properties['web_root'])
      ->interactive(false)
      ->run();

    if ($terminus_url_request->wasSuccessful()) {
      $terminus_url = $terminus_url_request->getMessage();
    }
    else {
      $this->yell('Failed to find a recent backup for the ' . $terminus_site_env . ' site. Does one exist?');
      return FALSE;
    }

    $wget_database = $this->taskExec('wget -O vendor/database.sql.gz "' . trim($terminus_url) . '"')->run();

    if (!$wget_database->wasSuccessful()) {
      $this->yell('Remote database sync failed.');
      return FALSE;
    }

    return TRUE;
  }
41818
public function getActiveDomains($mode = AbstractQuery::HYDRATE_OBJECT, $siteType = null)
    {
        $query = $this->getEntityManager()
            ->createQueryBuilder()
            ->select('e')
            ->from($this->getEntity(), 'e')
            ->where('e.isActive = :active')
            ->setParameters(
                [
                    ':active' => 1,
                ]
            );

        if ($siteType) {
            $query->andWhere('e.siteType = :siteType')
                ->setParameter(':siteType', $siteType);
        } else {
            $query->orderBy('e.siteType');
        }

        return $query->getQuery()->getResult($mode);
    }
592585
public function isEnvironnement($nameEnv)
    {
        $authority = $this->request->getUri()->getAuthority();

        return isset($this->environnement[ $nameEnv ]) && (
            in_array(gethostname(), $this->environnement[ $nameEnv ]) ||
            in_array($authority, $this->environnement[ $nameEnv ])
            );
    }
329867
public function environmentDatabases($site, $env)
    {
        $variables = array(
            'site' => $site,
            'env' => $env,
        );
        $request = $this->get(array('{+base_path}/sites/{site}/envs/{env}/dbs.json', $variables));
        return new Response\Databases($request);
    }
439840
protected function buildEnvironmentVariables($env)
    {
        $variables = '';
        foreach ($env as $key => $value) {
            $variables .= $key.'='.$value.' ';
        }

        return trim($variables);
    }
445417
public function load($env)
    {
        try {
            return $this->files->getRequire($this->path($env));
        } catch (Exception $e) {
            return false;
        }
    }
715569
def dns_get_conf(self, domainName, environment):
        
        response = self.client.service.dns_get_conf(domainName, environment)
        dns_config = CotendoDNS(response)
        return dns_config
861019
public function evaluate(EnvironmentInterface $env)
    {
        $qb = $env->queryBuilder;

        $paramTemplate = $env->newParamName();
        $paramValue = $env->newParamName();
        $paramVs = $env->newParamName();

        $rootAliases = $qb->getRootAliases();
        
        $qb->innerJoin($rootAliases[0] . '.valueSet', $paramVs)
            ->innerJoin($paramVs . '.template', $paramTemplate);

        switch ($this->operator) {
            case 'in':
                $qb->andWhere($paramTemplate . '.id IN (:' . $paramValue . ')');
                break;
            case 'notin':
                $qb->andWhere($paramTemplate . '.id NOT IN (:' . $paramValue . ')');
                break;
        }

        $qb->setParameter($paramValue, $this->getRight()->getValue());
    }