public/index.php line 20

Open in your IDE?
  1. <?php
  2. /**
  3.  * Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
  4.  * See https://www.x-cart.com/license-agreement.html for license details.
  5.  */
  6. use XCart\Kernel;
  7. ini_set('max_execution_time'300);
  8. if (file_exists(dirname(__DIR__) . '/var/.rebuildInBlockingState')) {
  9.     require_once dirname(__DIR__) . '/maintenance.php';
  10.     echo getMaintenancePageContent('We are deploying new changes to our store. One minute and they will go live!');
  11.     exit(1);
  12. }
  13. require_once dirname(__DIR__) . '/vendor/autoload_runtime.php';
  14. return static function (array $context) {
  15.     // We can use only a production autoloader in the boot stage, so it is required to register an autoloader
  16.     // inside this function in case if we need to switch to a development autoloader after the boot stage.
  17.     // Autoloaders registered outside this function are hidden in runtime and can't be unregistered (but still used)
  18.     require_once dirname(__DIR__) . '/vendor/autoload_xcart.php';
  19.     require_once dirname(__DIR__) . '/bootstrap.php';
  20.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  21. };