Loading api/start.php −15 File deleted. Show changes public/index.php +10 −5 Changes for public/index.php: 10 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -3,8 +3,7 @@ declare(strict_types=1); use Laminas\Mvc\Application; use Symfony\Component\HttpKernel\Kernel as BaseKernel; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; //use App\Kernel; /** * This makes our life easier when dealing with paths. Everything is relative Loading @@ -28,9 +27,18 @@ if (php_sapi_name() === 'cli-server') { unset($path); } if (str_starts_with($_SERVER['REQUEST_URI'],'/api')){ // require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; // return function (array $context) { // return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); // }; die('Aucune API n\'existe pour le moment'); }else { // Composer autoloading include __DIR__ . '/../vendor/autoload.php'; if (! class_exists(Application::class)) { throw new RuntimeException( "Unable to load application.\n" Loading @@ -41,9 +49,6 @@ if (! class_exists(Application::class)) { $container = require __DIR__ . '/../config/container.php'; if (str_starts_with($_SERVER['REQUEST_URI'],'/api')){ require dirname(__DIR__) . '/api/start.php'; }else { // Run the application! /** @var Application $app */ $app = $container->get('Application'); Loading Loading
public/index.php +10 −5 Changes for public/index.php: 10 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -3,8 +3,7 @@ declare(strict_types=1); use Laminas\Mvc\Application; use Symfony\Component\HttpKernel\Kernel as BaseKernel; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; //use App\Kernel; /** * This makes our life easier when dealing with paths. Everything is relative Loading @@ -28,9 +27,18 @@ if (php_sapi_name() === 'cli-server') { unset($path); } if (str_starts_with($_SERVER['REQUEST_URI'],'/api')){ // require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; // return function (array $context) { // return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); // }; die('Aucune API n\'existe pour le moment'); }else { // Composer autoloading include __DIR__ . '/../vendor/autoload.php'; if (! class_exists(Application::class)) { throw new RuntimeException( "Unable to load application.\n" Loading @@ -41,9 +49,6 @@ if (! class_exists(Application::class)) { $container = require __DIR__ . '/../config/container.php'; if (str_starts_with($_SERVER['REQUEST_URI'],'/api')){ require dirname(__DIR__) . '/api/start.php'; }else { // Run the application! /** @var Application $app */ $app = $container->get('Application'); Loading