Bootstrap and route a request in Magento
Learn how Magento bootstraps requests in pub/index.php, dispatches routers, and matches URLs to controllers and layouts.
Lesson Content
When a request hits Magento's entry point in pub/index.php, PHP takes control and Magento begins its initialization process. Let's see how Magento bootstraps itself and determines which code handles the incoming request.
The bootstrap process
The pub/index.php file is surprisingly simple. It finds the application directory and creates a bootstrapper:
<?php
/**
* Public alias for the application entry point
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
use Magento\Framework\App\Bootstrap;
try...
Join the discussion!
Comments
Want to comment on this lesson?
Enroll in this course to leave comments.