Download the PHP package pollen-solutions/partial without Composer
On this page you can find all versions of the php package pollen-solutions/partial. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pollen-solutions/partial
More information about pollen-solutions/partial
Files in pollen-solutions/partial
Package partial
Short Description Pollen Solutions - Partial Component - Layer and tools for creating reusable web user interfaces.
License MIT
Homepage https://www.presstify.com/pollen-solutions/partial/
Informations about the package partial
Partial Component
Pollen Solutions Partial Component provides layer and tools for creating reusable web user interfaces.
Installation
Basic Usage
From a callable
From the default partial tag driver
From a custom driver
Through a PSR-11 depency injection container
Shows a partial driver instance with custom parameters
Recalls the same partial driver instance with keeped custom parameters
Partial driver API
Partial driver parameters of call
Partial driver instance methods
View API usage
Plates view engine
Partial driver used Plates as default template engine.
-
Creates a view file for the partial driver.
- Creates and call a partial driver with this above file directory as view directory.
Uses another view engine
Your are free to used your own instance of Pollen\View\ViewInterface as the partial driver view parameter if needed. In this example Twig engine is used instead Plates.
-
Creates a view file for the partial driver.
- Creates and call a partial driver with this above file directory as view directory.
Routing API usage
In some cases, partial driver should be able to send a response through a controller, for example to respond from a rest api call.
Fortunately, all partial driver instance are related to a route stack and have a reponseController method to do that. The partial driver route stack is created for all known HTTP methods (GET, POST, PATH, OPTIONS, DELETE) and for a particular api method that works with XHR HTTP request.
-
Creates a partial driver and gets its route url for the get http method.
- Now you can call the route url in your browser.
Get the partial response
Obviously, you are free to use your own routing stack and them controller methods instead.
All versions of partial with dependencies
pollen-solutions/http Version ^1.0
pollen-solutions/routing Version ^1.0
pollen-solutions/support Version ^1.0
pollen-solutions/validation Version ^1.0
pollen-solutions/view Version ^1.0
pollen-solutions/view-extends Version ^1.0