Download the PHP package icanboogie/render without Composer
On this page you can find all versions of the php package icanboogie/render. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download icanboogie/render
More information about icanboogie/render
Files in icanboogie/render
Package render
Short Description Renders templates with a variety of template engines.
License
Homepage https://icanboogie.org/
Informations about the package render
Render
An API to render templates with a variety of template engines.
Installation
Render engines
Templates may be rendered with a variety of template engines.
The following example demonstrates how to create an engine provider with the builtin engine for PHP templates.
Note: Currently, the package only provides an engine to render PHP templates, the available engine can be extended with third parties packages such as render-engine-markdown or render-engine-patron.
Render engine providers
Render engines are obtained through engine providers. The following providers are builtin:
- EngineProvider\Container: Provides engines from a PSR container.
- EngineProvider\Immutable: Provides engines from an immutable collection.
- EngineProvider\Mutable: Provides engines from a mutable collection.
The following examples demonstrates how to obtain an engine for a .php
extension from an immutable
provider.
All engine providers are traversable, this feature can be used to collect the supported extensions:
The pathname of the template being rendered
Engines should use the Engine::VAR_TEMPLATE_PATHNAME
variable to define the pathname of the
template being rendered, so that it is easy to track which template is being rendered and from
which location.
Template resolver
A template resolver tries to match a template name with an actual template file. A set of paths can be defined for the resolver to search in.
Renderer
A Renderer instance is used to render a template with a subject and options. An engine collection and a template resolver are used to find suitable templates for the rendering.
Continuous Integration
The project is continuously tested by GitHub actions.
Code of Conduct
This project adheres to a Contributor Code of Conduct. By participating in this project and its community, you are expected to uphold this code.
Contributing
Please see CONTRIBUTING for details.
License
icanboogie/render is released under the BSD-3-Clause.