herrera-io/silex-template

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

A Silex service provider for Template.

1.0.0 2013-01-20 17:58 UTC

This package is not auto-updated.

Last update: 2021-12-07 01:37:16 UTC


README

Build Status

A Silex service provider for Template.

Summary

Adds an instance of Herrera\Template\Engine to Silex under the key template.engine.

Installation

Add it to your list of Composer dependencies:

$ composer require herrera-io/silex-template=1.*

Usage

<?php

use Herrera\Template\TemplateServiceProvider;
use Silex\Application;

$app = new Application();

$app->register(new TemplateServiceProvider(), array(
    'template.dir' => '/path/to/dir',
    'template.dir' => array(
        '/path/to/dir1',
        '/path/to/dir2',
        '/path/to/dir3',
    )
));

$app['template.engine']->render('test.php');