PhilippBaschke\ACFProInstaller\Plugin::getKeyFromEnv PHP Method

getKeyFromEnv() protected method

Loads the .env file that is in the same directory as composer.json and gets the key from the environment variable KEY_ENV_VARIABLE. Already set variables will not be overwritten by the variables in .env
protected getKeyFromEnv ( ) : string
return string The key from the environment
    protected function getKeyFromEnv()
    {
        $this->loadDotEnv();
        $key = getenv(self::KEY_ENV_VARIABLE);
        if (!$key) {
            throw new MissingKeyException(self::KEY_ENV_VARIABLE);
        }
        return $key;
    }