herrera-io/silex-template

此包已废弃,不再维护。未建议替代包。

Template的Silex服务提供者。

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

Template的Silex服务提供者。

摘要

向Silex添加一个Herrera\Template\Engine实例,键为template.engine

安装

将其添加到Composer依赖项列表中

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

使用

<?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');