Download the PHP package componenta/templater-app without Composer
On this page you can find all versions of the php package componenta/templater-app. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download componenta/templater-app
More information about componenta/templater-app
Files in componenta/templater-app
Package templater-app
Short Description Componenta application integration for template rendering
License MIT
Informations about the package templater-app
Componenta Templater App
Application integration for componenta/templater. It registers the template engine, renderer, bootloader, static View helper, and global view() function.
Installation
The package exposes Componenta\Templater\App\ConfigProvider through Composer metadata and autoloads src/functions.php.
Registered Services
Componenta\Templater\App\ConfigProvider registers:
| Service or key | Registration |
|---|---|
Componenta\Templater\Engine |
EngineFactory, using template config and PathResolverInterface. |
Componenta\Templater\RendererInterface |
RendererFactory, wrapping the registered engine. |
ViewBootloader |
Autowired bootloader. |
AppConfigKey::BOOTLOADERS |
Adds ViewBootloader so View receives the renderer during application boot. |
Configuration
Template settings are read from the renderer config section:
Paths are resolved through PathResolverInterface. The default template directory is templates, and the default extension is phtml.
Runtime Behavior
ViewBootloader runs in HTTP and CLI scopes. It gets RendererInterface from the container and installs it into View::setRenderer(). After boot, code can call:
Calling view() or View::render() before the bootloader runs throws LogicException.
Boundary
The package wires templates into an application. The renderer implementation itself lives in componenta/templater; path resolution lives in componenta/path-resolver.
All versions of templater-app with dependencies
componenta/app Version ^4.0.0 || ^5.0.0
componenta/config Version ^3.0.0
componenta/path-resolver Version ^1.0
componenta/scope Version ^1.0
componenta/templater Version ^1.0
psr/container Version ^2.0