dotsunited/bundlefu-twig-extension 问题修复 & 功能扩展

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

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

dotsunited/bundlefu-twig-extension

最新稳定版本:v1.0.0

Composer 安装命令:

composer require dotsunited/bundlefu-twig-extension

包简介

Twig extension for BundleFu

README 文档

README

Build Status

The BundleFuTwigExtension integrates BundleFu into the Twig template engine.

Installation

BundleFuTwigExtension can be installed using the Composer tool. You can either add dotsunited/bundlefu-twig-extension to the dependencies in your composer.json, or if you want to install BundleFuTwigExtension as standalone, go to the main directory and run:

$ wget http://getcomposer.org/composer.phar 
$ php composer.phar install

You can then use the composer-generated autoloader to access the BundleFuTwigExtension classes:

<?php
require 'vendor/autoload.php';
?>

Usage

Register the BundleFuExtension to your Twig environment:

<?php
$factory = new \DotsUnited\BundleFu\Factory();
$extension = \DotsUnited\BundleFu\Twig\BundleFuExtension($factory);

$twig = new \Twig_Environment($loader);
$twig->addExtension($extension);
?>

The extension uses the factory to create bundle instances. See the BundleFu documentation about how to configure the factory.

The extension exposes a new bundle tag with the following syntax:

{% bundle name='test_bundle'
          doc_root = '/my/docroot'
          bypass=false
          render_as_xhtml=true
          css_filter='css_filter'
          js_filter='js_filter'
          css_cache_path='cache'
          js_cache_path='cache'
          css_cache_url='/cache'
          js_cache_url='/cache'
%}
<link href="/css_1.css" media="screen" rel="stylesheet" type="text/css"/>
<script src="/js_1.js" type="text/javascript"></script>
{% endbundle %}

License

BundleFuTwigExtension is released under the MIT License.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 8
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-02-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固