web/index.php line 30

  1. <?php
  2. /*
  3.  * This file is part of the Thelia package.
  4.  * http://www.thelia.net
  5.  *
  6.  * (c) OpenStudio <info@thelia.net>
  7.  *
  8.  * For the full copyright and license information, please view the LICENSE
  9.  * file that was distributed with this source code.
  10.  */
  11. use Symfony\Component\Dotenv\Dotenv;
  12. use Symfony\Component\ErrorHandler\Debug;
  13. use Thelia\Core\HttpFoundation\Request;
  14. use Thelia\Core\Thelia;
  15. require dirname(__DIR__).'/vendor/autoload.php';
  16. (new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
  17. if ($_SERVER['APP_DEBUG']) {
  18.     umask(0000);
  19.     Debug::enable();
  20. }
  21. $thelia = new App\Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  22. $request Request::createFromGlobals();
  23. $response $thelia->handle($request);
  24. $response->send();
  25. $thelia->terminate($request$response);