Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Gets the value of an environment variable
getenv(string $varnamebool $local_only false): string|false
    public static function downloadAndConfigureVendor()

    {

        
self::downloadVendorArchive(

            
getenv('BREF_DOWNLOAD_VENDOR'),

            
self::DOWNLOAD_FILE_PATH

        
);
        preg_match('~s3\:\/\/([^\/]+)\/(.*)~'$s3String$matches);

        
$bucket $matches[1];

        
$filePath '/' $matches[2];

        
$region getenv('AWS_REGION');



        
$url self::AWS_S3_PresignDownload(

            
getenv('AWS_ACCESS_KEY_ID'),
        $region getenv('AWS_REGION');



        
$url self::AWS_S3_PresignDownload(

            
getenv('AWS_ACCESS_KEY_ID'),

            
getenv('AWS_SECRET_ACCESS_KEY'),

            
getenv('AWS_SESSION_TOKEN'),

            
$bucket,
        $url self::AWS_S3_PresignDownload(

            
getenv('AWS_ACCESS_KEY_ID'),

            
getenv('AWS_SECRET_ACCESS_KEY'),

            
getenv('AWS_SESSION_TOKEN'),

            
$bucket,

            
$region,
        $url self::AWS_S3_PresignDownload(

            
getenv('AWS_ACCESS_KEY_ID'),

            
getenv('AWS_SECRET_ACCESS_KEY'),

            
getenv('AWS_SESSION_TOKEN'),

            
$bucket,

            
$region,

            
$filePath
    {

        
$updatedStaticLoader str_replace(

            
"__DIR__ . '/../..'",

            
sprintf("'%s'"rtrim(getenv('LAMBDA_TASK_ROOT'), '/')),

            
file_get_contents(self::AUTOLOAD_STATIC_PATH)

        );
    public static function downloadAndConfigureVendor()

    {

        
self::downloadVendorArchive(

            
getenv('BREF_DOWNLOAD_VENDOR'),

            
self::DOWNLOAD_FILE_PATH

        
);
        preg_match('~s3\:\/\/([^\/]+)\/(.*)~'$s3String$matches);

        
$bucket $matches[1];

        
$filePath '/' $matches[2];

        
$region getenv('AWS_REGION');



        
$url self::AWS_S3_PresignDownload(

            
getenv('AWS_ACCESS_KEY_ID'),
        $region getenv('AWS_REGION');



        
$url self::AWS_S3_PresignDownload(

            
getenv('AWS_ACCESS_KEY_ID'),

            
getenv('AWS_SECRET_ACCESS_KEY'),

            
getenv('AWS_SESSION_TOKEN'),

            
$bucket,
        $url self::AWS_S3_PresignDownload(

            
getenv('AWS_ACCESS_KEY_ID'),

            
getenv('AWS_SECRET_ACCESS_KEY'),

            
getenv('AWS_SESSION_TOKEN'),

            
$bucket,

            
$region,
        $url self::AWS_S3_PresignDownload(

            
getenv('AWS_ACCESS_KEY_ID'),

            
getenv('AWS_SECRET_ACCESS_KEY'),

            
getenv('AWS_SESSION_TOKEN'),

            
$bucket,

            
$region,

            
$filePath
    {

        
$updatedStaticLoader str_replace(

            
"__DIR__ . '/../..'",

            
sprintf("'%s'"rtrim(getenv('LAMBDA_TASK_ROOT'), '/')),

            
file_get_contents(self::AUTOLOAD_STATIC_PATH)

        );
ini_set('display_errors''1');

error_reporting(E_ALL);



$appRoot getenv('LAMBDA_TASK_ROOT');



if (
getenv('BREF_DOWNLOAD_VENDOR')) {

    if(! 
file_exists('/tmp/vendor') || ! file_exists('/tmp/vendor/autoload.php')) {
$appRoot getenv('LAMBDA_TASK_ROOT');



if (
getenv('BREF_DOWNLOAD_VENDOR')) {

    if(! 
file_exists('/tmp/vendor') || ! file_exists('/tmp/vendor/autoload.php')) {

        require_once 
'/opt/bref/breftoolbox.php';
    }



    require 
'/tmp/vendor/autoload.php';

} elseif (
getenv('BREF_AUTOLOAD_PATH')) {


    require 
getenv('BREF_AUTOLOAD_PATH');

} else {