Sets the environments for this portal.

@param \Sulu\Component\Webspace\Environment[] $environments
515060
public function setEnvironments(array $environments)
    {
        $this->environments = [];

        foreach ($environments as $environment) {
            $this->addEnvironment($environment);
        }
    }
43816
public function setEnvironment($environment)
    {
        if (array_key_exists('environments', $this->configuration) && array_key_exists($environment, $this->configuration['environments'])) {
            $this->environment = $environment;
            return $this;
        }

        throw new RuntimeException(sprintf('The environment "%s" does not exists.', $environment), 100);
    }
198750
public function setOrganizations(array $organizations)
    {
        $this->hasOrganizationsProperty();

        $this->organizations = $organizations instanceof ArrayCollection ?
            $organizations :
            new ArrayCollection($organizations);
    }
401195
public function setEnvironments($env) {
    $envs = (explode('+', $env));
    while (!empty($envs)) {
      $_env = array_shift($envs);
      if (!$this->setEnvironment($_env)) {
        $msg = dt("Unable to locate an environment definition for '@env'.", ['@env' => $_env]);
        if (empty($envs)) {
          drush_log($msg, 'warning');
          return FALSE;
        }
        else {
          drush_log($msg, 'warning');
          if (!drush_confirm(dt("Do you want to process the other environments?"))) {
            return drush_user_abort(dt("Aborting."));
          }
        }
      }
    }

    return TRUE;
  }
1073404
public function setNamespaces($namespaces)
    {
        $this->set(self::KEY_NAMESPACES, $namespaces);
        $this->provisioningMode = self::PROVISIONING_MODE_NAMESPACES;
        return $this;
    }
648143
static function setCurrentEnvironment($environment)
    {
        if ( is_string($environment) && !class_exists($environment) )
            return static::setAlias($environment, static::CURRENT_NAME);
 

        static::register($environment, static::CURRENT_NAME);
    }
887091
public static function setEnvironment($environment) {
        if (!empty($environment)) {
            foreach (array_values(static::$registeredInstances) as $instance) {
                $instance->setEnvironment($environment);
            }
            static::$ENVIRONMENT = $environment;
        } 
        
    }
1062582
public static function setEnvironment($env = self::ENV_STAGE)
  {
    $prefix = '';
    if($env === self::ENV_STAGE)
    {
      $prefix = 's';
    }

    static::$apiHost = $prefix . 'api.fortifi.io';
  }
1101704
public void setBaseEnvironmentProperties(Map<String, Object> baseEnvironmentProperties) {
		this.baseEnv = new Hashtable<String, Object>(baseEnvironmentProperties);
	}
1310287
public function environment(...$environments)
    {
        $env = \env('APP_ENV', 'production');

        if (\func_num_args() > 0) {
            $patterns = \is_array($environments[0]) ? $environments[0] : $environments;

            foreach ($patterns as $pattern) {
                if (Str::is($pattern, $env)) {
                    return true;
                }
            }

            return false;
        }

        return $env;
    }
709797
public void setEnvironment(ConfigurableEnvironment environment) {
		this.annotatedReader.setEnvironment(environment);
		this.xmlReader.setEnvironment(environment);
		this.scanner.setEnvironment(environment);
	}
575280
public function setOptions($options)
    {
        $this->options = [
            'config_dir' => null,
            'cache_dir' => null,
            'debug' => false,
            'cache_class' => 'WebspaceCollectionCache',
            'base_class' => 'WebspaceCollection',
        ];

        // overwrite the default values with the given options
        $this->options = array_merge($this->options, $options);
    }
635030
public static function setEnv(array $env = [])
    {
        self::$envIsSet = true;

        foreach ($env as $variable => $value) {
            self::setEnvironmentVariable($variable, $value);
        }
    }
679511
public void setEnvironmentIds(java.util.Collection<String> environmentIds) {
        if (environmentIds == null) {
            this.environmentIds = null;
            return;
        }

        this.environmentIds = new java.util.ArrayList<String>(environmentIds);
    }
364313
public function setPaths($paths, $namespace = self::DEFAULT_NAMESPACE)
    {
        if (! is_array($paths)) {
            $paths = [$paths];
        }
        $this->paths[$namespace] = [];
        foreach ($paths as $path) {
            $this->addPath($path, $namespace);
        }
    }
1269575
public function setEnvironment($environment = 'test')
    {
        $environment = trim($environment);
        if ($environment === 'live') {
            //Live
            $this->_setEnvironment = 'https://sis.redsys.es/sis/realizarPago';
        } elseif ($environment === 'test') {
            //Test
            $this->_setEnvironment = 'https://sis-t.redsys.es:25443/sis/realizarPago';
        } else {
            throw new TpvException('Add test or live');
        }

        return $this;
    }
565869
public function set_areas(array $areas) {
        foreach ($areas as $area) {
            if ($area instanceof base && !key_exists($area->get_area_id(), $this->areas)) {
                $this->areas[$area->get_area_id()] = $area;
            }
        }
    }