Scalr_Account::createEnvironment PHP Méthode

createEnvironment() public méthode

Creates a new environment assosiated with the account
public createEnvironment ( string $name ) : Scalr_Environment
$name string
Résultat Scalr_Environment
    public function createEnvironment($name)
    {
        $config = [];
        if (!$this->id) {
            throw new Exception("Account has not been created yet.");
        }
        $this->validateLimit(Scalr_Limits::ACCOUNT_ENVIRONMENTS, 1);
        $env = Scalr_Environment::init()->create($name, $this->id);
        $config[Scalr_Environment::SETTING_TIMEZONE] = "America/Adak";
        //$config[Scalr_Environment::SETTING_API_LIMIT_ENABLED] = 1;
        //$config[Scalr_Environment::SETTING_API_LIMIT_REQPERHOUR] = 18000;
        $env->setPlatformConfig($config, false);
        return $env;
    }