Download the PHP package slepic/templated-tracy-bar-panel without Composer
On this page you can find all versions of the php package slepic/templated-tracy-bar-panel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download slepic/templated-tracy-bar-panel
More information about slepic/templated-tracy-bar-panel
Files in slepic/templated-tracy-bar-panel
Package templated-tracy-bar-panel
Short Description Generic implementaton of Tracy\IBarPanel which allows you to implement IBarPanel factory classes instead of implementing IBarPanel directly.
License BSD-3-Clause
Informations about the package templated-tracy-bar-panel
templated-tracy-bar-panel
A simple implementation of that allows you to create custom panels by composition of two templates (for tab and panel respectively) and a data provider which feeds the templates with specific data.
The advantage of using instead of implementing the IBarPanel interface directly are:
- Implement just the and use your favourite templating engine for tab and panel templates.
- You abstract your implementation from a specific templating engine. Once you find a better/faster templating engine you can switch to it by just reimplementing the templates and not the way the data for them are gathered.
- You allow your panels to change their look without having to modify them. You just pass different templates to them.
Requirements
- PHP 5.6 or PHP 7.0
- slepic/php-template (packagist)
Installation
Install with composer
Usage
When implementing a for Tracy, instead of implementing the interface directly, create just a factory class, which will instantiate the like this:
You need to implement the to provide specific data for your templates.
The two templates can be the provided by the slepic/php-template package.
But if you prefer a higher level template engine, see slepic/php-template-implementation to see if there is an existing binding for your favourite templating engine.
Changelog
0.2.0
- Update dependency slepic/php-template to v0.2.
- Changed return type of and to array.
- Changed travis setup to only run tests in oldest and newest php versions supported by this package (that is 5.6 and 7.3).