Intro to Modules in ZF2
summary
Explains ZF2 modules as simple folders with a Module.php class exposing methods like getAutoloaderConfig, getConfig, init and onBootstrap, loaded by an event-driven ModuleManager. Covers Phar packaging (prefer non‑compressed .phar/.tar), Composer/vendor install, PSR-0 src layout, cached three-step config merge, lazy service loading via ServiceManager, and real-world modules (zfc-user, scn-social-auth) used to compose an app (~35 commerce modules). Advises modules be read‑only, do one job, and avoid writes inside packaged modules.
AI-written summary · about
chapters (18)
- 0:00Intro
- 1:00What is a module?
- 5:07What can modules be?
- 12:51Module directory structure
- 15:17Application conti
- 16:34Module paths
- 17:27Packaging a module is easy
- 18:14Phar packaging is transparent
- 20:22Module distribution
- 24:21Naming your module
- 25:58A real ZF2 module
- 27:33Zend Module Manager
- 28:25Module events
- 31:00AutoloaderListener
- 32:24Init Trigger
- 35:00Service Listener
- 38:27Module configuration
- 40:53Module best practices








