承接 suin/php-yaf-twig 相关项目开发

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

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

suin/php-yaf-twig

Composer 安装命令:

composer require suin/php-yaf-twig

包简介

Twig extension for Yet Another Framework.

README 文档

README

Twig extension for Yet Another Framework.

Installation

You can install via Composer.

At first create composer.json file:

{
	"require": {
		"suin/php-yaf-twig": ">=1.0"
	}
}

Run composer to install.

$ composer install

Finally, include vendor/autoload.php at index.php

require_once 'vendor/autoload.php';

Add to Bootstrap.php:

<?php

use \Suin\Yaf\Twig\Twig;

class Bootstrap extends Yaf_Bootstrap_Abstract
{

	/**
	 * @param Yaf_Dispatcher $dispatcher
	 */
	protected function _initTwig(Yaf_Dispatcher $dispatcher)
	{
		$config = Yaf_Application::app()->getConfig()
		$dispatcher->setView(new Twig(APP_PATH.'views', $config->twig->toArray()));
	}
}

Add to application.ini:

[product]

;app
application.view.ext = twig

;twig
twig.cache = APP_PATH "../cache"

[devel : product]

;twig
twig.debug = true

License

MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-08-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固