rush/view-strategies

This package is abandoned and no longer maintained. No replacement package was suggested.

Multi template engine driver for PHP

0.9 2016-11-11 10:36 UTC

This package is not auto-updated.

Last update: 2020-01-24 16:43:46 UTC


README

[[DEPRECATED]] This repository is no longer maintained. We'll delete this repository & unpublish package at 2017/12/31.

php-view-strategies

CircleCI codecov Latest Stable Version License

Multi template engine driver for PHP

Installation

composer require rush/view-strategies

Getting started

<?php

use Rush\View;

View::configure([
    'base_path' => '/path/to/view',
    'default_extension' => 'php',
    'strategies' => [
        'php' => 'View\\Strategy\\Plate',
        'jade' => 'View\\Strategy\\Jade',
    ],
]);

echo new View('index.php')->render([ 'name' => 'John', 'age' => 30 ]);
echo new View('relative/path/to/view.jade')->render();

See more example

Testing

composer test

License

The MIT License (MIT). Please see License File for more information.