jaypha/jayponents-latte
Composer 安装命令:
composer require jaypha/jayponents-latte
包简介
Latte adaptor for Jayponents
README 文档
README
Written by Jason den Dulk
A template engine adaptor to enable Jayponents to be used with Latte Templates.
Requirements
PHP v5.4.0 or greater. Jayponents Nette Latte
Installation
composer require jaypha/jayponents-latte
Usage
Create a Latte Engine as normal. Create an engine adaptor and set the template adaptor in Component.
Examples
use Jaypha\Jayponents\Component;
use Jaypha\Jayponents\Latte\LatteEngineAdaptor;
$latte = new Latte\Engine();
$adaptor = new LatteEngineAdaptor($latte);
// Can make the template adaptor the default for all components.
Component::setDefaultEngine($adaptor);
// Can assign template adaptor to individual components.
$component = new Component();
$component->setEngine($adaptor);
jayp Macro
Within a Latte template, you include a component using 'jayp'. It will call the 'display' method of the object, or do nothing if it is null.
Example
{jayp $content}
License
Copyright (C) 2017-9 Jaypha.
Distributed under the Boost Software License, Version 1.0.
See http://www.boost.org/LICENSE_1_0.txt
统计信息
- 总下载量: 58
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSL-1.0
- 更新时间: 2019-01-30