setProductionEnvironment(true); // Configure the database connection $env->setConfig('mysql.host', 'localhost'); $env->setConfig('mysql.user', 'root'); $env->setConfig('mysql.pass', ''); $env->setConfig('mysql.db', 'dbname'); // Set other environment variables $env->setEnv('MAILGUN_API_KEY', 'yourapikey');
getEnv('MAILGUN_API_KEY');This example retrieves the value of the `MAILGUN_API_KEY` environment variable. Package Library: PhabricatorEnv is a part of the `libphutil` package.