Recommend this page to a friend! |
![]() |
Info | Documentation | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 86 | All time: 10,022 This week: 74![]() |
Version | License | PHP version | Categories | |||
mezon-html-template 1.0 | MIT/X Consortium ... | 5 | HTML, PHP 5, Templates |
Description | Author | |
This package can be used process HTML templates replacing variables. |
Just type
composer require mezon/html-template
First of all you need to create object
$template = new \Mezon\HtmlTemplate\HtmlTemplate('./main-template/');
This code assumes that you have all template resources in the directory './main-template/'
But you can also specify a list of paths, and while template compilation they all will be scanned for static files.
$template = new \Mezon\HtmlTemplate\HtmlTemplate(['./main-template/', './extra-files/res/']);
No need to specify all paths in the constructor. You can do it later with methods:
$template = new \Mezon\HtmlTemplate\HtmlTemplate('./main-template/');
$template->addPaths(['./path1', './path2']);
But be carefull if you have static files with the same names on different paths. While compilation the file on the latest added path will be used. It was done so to create a sort of overriding mechanism for template resources.
Or you can completely reset all paths:
$template->setPaths(['./path1', './path2']);
And view a list of paths:
var_dump($template->getPaths());
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() |
Class | Class source | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation | ||
![]() |
Class | Class source |
![]() |
/ | Tests |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
Class | Class source | ||
![]() |
Class | Class source |
![]() |
/ | Tests | / | test-data | / | res |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() ![]() |
Doc. | Documentation |
![]() |
/ | Tests | / | test-data | / | res | / | templates |
File | Role | Description |
---|---|---|
![]() ![]() |
Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
![]() | mezon-html-template-2020-07-07.zip 15KB |
![]() | mezon-html-template-2020-07-07.tar.gz 12KB |
![]() | Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.