Important
This repository is read-only.
Development happens in the Annabel monorepo: https://github.com/codemonster-ru/annabel
Issues and pull requests should be opened there.
PHP template engine for the codemonster-ru/view core.
Uses the core Locator for consistent file resolution (dot-notation, namespaces, multiple base paths).
Via Composer:
composer require codemonster-ru/view-phpuse Codemonster\View\View;
use Codemonster\View\Locator\DefaultLocator;
use Codemonster\View\Engines\PhpEngine;
$locator = new DefaultLocator([__DIR__ . '/resources/views']); // can be an array
$engine = new PhpEngine($locator, 'php'); // or ['phtml','php']
$view = new View(['php' => $engine], 'php');
echo $view->render('emails.welcome', ['user' => 'Vasya']);You can run tests with the command:
composer test