Download the PHP package pollen-solutions/view without Composer
On this page you can find all versions of the php package pollen-solutions/view. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pollen-solutions/view
More information about pollen-solutions/view
Files in pollen-solutions/view
Package view
Short Description Pollen Solutions - View Component - View template engine system.
License MIT
Homepage https://www.presstify.com/pollen-solutions/view/
Informations about the package view
View Component
Pollen Solutions View Component is a template engine system.
This is an expandable display template engine that natively integrates Plates and Twig library.
Installation
Fundamentals
About Plates
Plates is a native PHP template system that’s fast, easy to use. It’s inspired by the Twig template engine. Plates is designed for developers who prefer to use native PHP templates over compiled template languages.
Plates is use as default engine in the Pollen Solutions Components Suite.
More informations :
About Twig
Twig is the templating engine that included with Symfony Framework. Twig is a modern template engine for PHP. Twig compiles templates down to plain optimized PHP code.
Twig is natively included with Pollen View component.
More informations :
Third-party Engine
Blade
Blade is the templating engine that included with Laravel Framework.
Blade is not natively included with the Pollen View component, but can easily be added :
More informations :
Mustache
Mustache PHP engine is currently in project and coming soon.
More informations :
Fundamentals
An unified API interface
To respond to the particularity of each of the model display engines, Pollen View benefits from a unified interface this makes it possible to work with different engines via the same API.
Directory and override
Pollen View purposes a different logic from the libraries it inherits.
Each template file included in the template directory can be replaced by a template file with the same name in the override directory.
Extending the template engine
Pollen View also makes it possible to extend the functionalities of the template display engines through an easy interface.
Caching
To facilitate the work of application development, Pollen View allows you to disable the cache of the display template engines that it implements.
It is strongly recommended that you enable the cache when deploying to production.
Using global View
Template file
View call
Creating a new view instance
Simple usage
Template file
View call
Advanced usage
In this example we use a customized template class and the view is configured through the view engine callback.
Customized template class
Template file
View call
Extending a View
Simple method (with a callback)
Template file
View call
Advanced method with View Extension class
View Extension class
Template file
View call
All versions of view with dependencies
league/plates Version ^3.4
pollen-solutions/faker Version ^1.0
pollen-solutions/support Version ^1.0
twig/twig Version ^3.0