gluephp/glue-twig 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

gluephp/glue-twig

Composer 安装命令:

composer require gluephp/glue-twig

包简介

Use twig templating engine in Glue

README 文档

README

Use twig/twig with gluephp/glue

Installation

Use Composer:

$ composer require gluephp/glue-twig

Configure Twig

$app = new Glue\App;

$app->config->override([
    'twig' => [
        'path'    => '/absolute/path/to/templates/folder',
        'config'  => [
            // Additional Twig config, read Twigs 
            // documentation for more info...
        ]
    ],
]);

Register Twig

$app->register(
    new Glue\Twig\ServiceProvider()
);

Get the Twig instance

Once the service provider is registered, you can fetch the Twig instance with:

$twig = $app->make('Twig_Environment');

or use the alias:

$twig = $app->twig;

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固