This class is very simply for getting env variables
- Michal Odcházel - [email protected]
composer reqired litea/env
use Litea\Utils\Env;
$env = Env::get('ENVIRONMENT'); // get ENVIRONMENT and default is null
$env = Env::get('ENVIRONMENT'); // if ENVIRONMENT "false || FALSE || FaLsE" -> transfer to bool false
$env = Env::get('ENVIRONMENT'); // if ENVIRONMENT "true || NULL || tRuE" -> transfer to bool true
$env = Env::get('ENVIRONMENT'); // if ENVIRONMENT "null || NULL || NuLL" -> transfer to null
$env = Env::get('ENVIRONMENT'); // if ENVIRONMENT "15" -> transfer to int 15
$env = Env::get('ENVIRONMENT', 'PROD'); // get ENVIRONMENT and default is PROD
// Or get array
$env = Env::getArray('EMAILS'); // in EMAILS is [email protected];[email protected] return ['[email protected]', '[email protected]']
$env = Env::getArray('EMAILS' [deafult = null, [delimeter = ';']]);