mkrawczyk / mpts
Multi Platform Template System is a template engine for PHP and other platforms.
v1.5.10
2026-01-03 22:09 UTC
Requires
- php: >=8.0
- ext-dom: *
- mkrawczyk/funquery: ^v1.9.2
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.5.20
This package is auto-updated.
Last update: 2026-06-09 14:17:43 UTC
README
Official website: https://greencodestudio.github.io/mpts/
Usage in code
PHP
# Install the MPTS library using Composer
composer require mkrawczyk/mpts
// Import necessary classes from the MPTS library use MKrawczyk\Mpts\Environment; use MKrawczyk\Mpts\Parser\XMLParser; // Parse the MPTS template file $template = XMLParser::Parse(file_get_contents(__DIR__ . '/file.mpts')); // Create a new environment and set variables $env = new Environment(); $env->variables = ['foo' => 'bar']; // Execute the template with the environment and output the result echo $template->executeToString($env);