Architecture for application creators
This page is for application creators who want the map before they write code: what happens on a request, which part of the installation does what, and where an application's code belongs. The standards section explains the kernel's architecture in depth (Kernel architecture).
Contents
- The parts of an installation
- A request, step by step
- Where your code goes
- Settings and their order
- Command line and background work
The parts of an installation
From 1.2 The parts of an installation:
kernel/, lib/ the kernel: modules, classes, the template engine, the database layer
autoload/ the kernel's class map (autoload/ezp_kernel.php)
extension/ extensions: your application lives here
design/ designs: templates, stylesheets, images
settings/ shipped settings; settings/siteaccess/ and settings/override/ hold yours
var/ runtime: caches, logs, storage, the SQLite database
bin/php/console one entry point for every command
cronjobs/ the scripts runcronjobs.php runs
index.php the front controllerA request, step by step
index.phpstarts the web kernel (ezpKernelWeb).- Siteaccess: the address is matched against
site.ini [SiteAccessSettings] MatchOrder; the siteaccess's settings load (Siteaccesses). - URL translation: a URL alias is turned into a module address (
/About-ustocontent/view/full/58). - Module and view:
eZModulefinds the module inModuleRepositories[]and extension module directories, checks the view's policy functions and runs the view script, which returns a$Result(Custom modules and views). - Templates: the view renders a template found through the design chain; the result goes into
pagelayout.tpl(View results, templates and the pagelayout). - Caches short-cut most of this for repeat requests: the content view cache, cache blocks, the Velocity response cache.
Where your code goes
| Code | Place |
|---|---|
| Addresses and screens | extension/<ext>/modules/<module>/ |
| Business logic | PHP classes in extension/<ext>/classes/, named exp<Ext><Thing> |
| Templates, stylesheets, scripts | extension/<ext>/design/<design>/ |
| Settings | extension/<ext>/settings/*.ini.append.php |
| New field types | extension/<ext>/datatypes/ |
| Process steps | extension/<ext>/eventtypes/event/ |
| Scheduled work | extension/<ext>/cronjobs/ plus a cronjob.ini part |
| Commands | extension/<ext>/bin/php/ (console name ext:<ext>:<name>) |
| Tables | extension/<ext>/share/ or sql/ schema files |
Never edit kernel/, lib/ or another extension in place: an update replaces them. Use the registered extension
points first; a kernel class override is the last resort (Extension points).
Settings and their order
An INI value is read from settings/<file>.ini, then the extensions' siteaccess directories and
settings/siteaccess/<siteaccess>/, then the active extensions' settings/, then settings/override/; the last one
wins, so an active extension's settings/ wins over settings/siteaccess/<siteaccess>/. ./console exp:ini where <file>/<block>/<key> <siteaccess> shows every file that sets a value
(Settings and INI files).
Command line and background work
The same classes run outside a web request: console commands (bin/php/console), cronjob parts
(runcronjobs.php), and queue workers (expqueue). Kernel scripts, parts and views are classes now
(Exponential\Runnable\Command, CronjobPart, ModuleView), and your own can be too
(Commands, cronjob parts and module views as classes).
Related pages
- Exponential as an application platform
- Anatomy of an extension
- Layering and naming
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.