A free and open-source book on Zend Framework for beginners


3.13. Summary

In this chapter, we've learned some theory about ZF3-based website operation basics.

ZF3 uses PHP namespaces and class autoloading features, simplifying the development of applications which use many third-party components. The namespaces allow to solve the name collisions between code components, and provide you with the ability to make the long names shorter.

The class autoloading makes it possible to use any PHP class in any library installed with Composer without the use of require_once statement. Composer also provides a PSR-4 autoloader for the classes located in the modules of your web application.

Most of Zend Framework 3 components require configuration. You can define the configuration parameters either at the application level, or at the module level.

The main goal of any web application is handling the HTTP request and producing an HTTP response typically containing the HTML code of the requested web page. When Apache web server receives an HTTP request from a client browser, it executes the index.php file, which is also called the site's entry script. On every HTTP request, the Zend\Mvc\Application object is created, whose "life cycle" consists of several stages (or events).

The web application's business logic can be also considered as a set of services. In Zend Framework 3, the service manager is a centralized container for all the application services. A service is typically a PHP class, but in general it can be a variable or an array, if needed.


Top