Env

Class Env

Helper for handling changing variables in different environments

Known environment variables:

  • string iam_service_url the Url to the IAM Service
  • string payment_service_url the Url to the Payment Service
  • string locale language code, use only 2 letters like 'en'
package

NextEvent\PHPSDK\Util

Methods

Get currently selected environment

getEnv() : string
static

Response

string

Get variable from environment

getVar(string $key) : mixed
static

Arguments

$key

string

Response

mixed

Select the NextEvent environment to connect with

setEnv(string $environment) 
static

Arguments

$environment

string

either PROD, TEST, DEV

Set environment variable by key

setVar(string $key, mixed $value, string $environment = '*') 
static

Arguments

$key

string

$value

mixed

$environment

string