承接 sergiors/templating-service-provider 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sergiors/templating-service-provider

最新稳定版本:2.0.1

Composer 安装命令:

composer require sergiors/templating-service-provider

包简介

Template engine implementation using PHP or Twig for Silex

README 文档

README

A service to help you with template engine implementation using PHP or Twig.

Install

composer require sergiors/templating-service-provider
use Sergiors\Silex\Provider\TemplatingServiceProvider;

$app->register(new TemplatingServiceProvider(), [
    'templating.paths' => '__DIR__.'/../Resources/views/%name%' // or an array
]);

$app['templating']->render(/.../);

If you want to use Twig:

use Silex\Provider\TwigServiceProvider;
use Sergiors\Silex\Provider\TemplatingServiceProvider;

$app->register(new TwigServiceProvider(), [
    'twig.path' => __DIR__.'/../Resources/views'
]);
$app->register(new TemplatingServiceProvider());

$app['templating']->render(/.../);

Don't forget to install twig/twig and symfony/twig-bridge to use the Twig.

License

MIT

统计信息

  • 总下载量: 42.35k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-01