src/API/Implementation/ApiAbstract.php
protected function initPropertiesFromEnvironment(): void
    {
        foreach ($this->envProperties as $property => $env) {
            if (!property_exists($this, $property)) {
                throw new InvalidPropertyException(
                    sprintf("Property \"%s\" does not exist within the class \"%s\"", $property, get_class($this))
                );
            }

            if (false === ($envSetting = getenv($env))) {
                throw new InvalidEnvironmentException(
                    sprintf("Required environment variable \"%s\" is not set", $env)
                );
            }

            $this->{$property} = $envSetting;
        }
    }
protected function initPropertiesFromEnvironment(): void
    {
        foreach ($this->envProperties as $property => $env) {
            if (!property_exists($this, $property)) {
                throw new InvalidPropertyException(
                    sprintf("Property \"%s\" does not exist within the class \"%s\"", $property, get_class($this))
                );
            }

            if (false === ($envSetting = getenv($env))) {
                throw new InvalidEnvironmentException(
                    sprintf("Required environment variable \"%s\" is not set", $env)
                );
            }

            $this->{$property} = $envSetting;
        }
    }
protected function initPropertiesFromEnvironment ( ) : void { foreach ( $ this -> envProperties as $ property => $ env ) { if ( ! property_exists ( $ this , $ property ) ) { throw new InvalidPropertyException ( sprintf ( "Property \"%s\" does not exist within the class \"%s\"" , $ property , get_class ( $ this ) ) ) ; } if ( false === ( $ envSetting = getenv ( $ env ) ) ) { throw new InvalidEnvironmentException ( sprintf ( "Required environment variable \"%s\" is not set" , $ env ) ) ; } $ this -> { $ property } = $ envSetting ; } }
Fills specified properties using environment variables

@throws InvalidPropertyException
@throws InvalidEnvironmentException
Fills specified properties using environment variables