hampe/inky
最新稳定版本:1.3.6.2
Composer 安装命令:
composer require hampe/inky
包简介
PHP Implementation of ZURB's Foundation for Email parser (Inky)
README 文档
README
Issue reports and pull requests will not be attended.
Inky
A PHP Implementation of ZURB's Foundation for Email parser (Inky).
Installation
You can install this bundle using composer
composer require hampe/inky
or add the package to your composer.json file directly.
Usage and Examples
Basic Usage.
<?php use Hampe\Inky\Inky; $gridColumns = 12; //optional, default is 12 $additionalComponentFactories = []; //optional $inky = new Inky($gridColumns, $additionalComponentFactories); $inky->releaseTheKraken('html...');
Add Tag-Alias
<?php use Hampe\Inky\Inky; $inky = new Inky(); $inky->addAlias('test', 'callout') $inky->releaseTheKraken('<test>123</test>'); //equal to "<callout>123</callout>"
Add your own component factory
Add your own component factory, to convert custom HTML-Tags.
<?php use Hampe\Inky\Component\ComponentFactoryInterface; use Hampe\Inky\Inky; use PHPHtmlParser\Dom\HtmlNode; class TestComponentFactory implements ComponentFactoryInterface { public function getName() { return 'test' // name of the html tag. } public function parse(HtmlNode $element, Inky $inkyInstance) { // ... } } $inky = new Inky(); $inky->addComponentFactory(new TestComponentFactory()); $inky->releaseTheKraken('<test></test>');
License
See the LICENSE file for license info (it's the MIT license).
统计信息
- 总下载量: 601.98k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 48
- 点击次数: 1
- 依赖项目数: 6
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2016-03-15