gios-asu/waggle-email-maker
最新稳定版本:0.0.1
Composer 安装命令:
composer require gios-asu/waggle-email-maker
包简介
PHP email utilities for creating email safe HTML
README 文档
README
PHP email utilities for creating email safe HTML
Documentation
Installation
composer require gios-asu/waggle-email-maker
Email Handlebars Factory
Basic usage:
use Waggle\Factories\EmailHandlebarsFactory; $factory = new EmailHandlebarsFactory(); $factory->set_data( array( 'title' => 'My Awesome Email' ) ); $factory->set_css( 'h1 { font-size: 20px }' ); $factory->set_handlebars( '<h2>{{title}}</h2>' ); echo $factory->build();
The constructor for EmailHandlebarsFactory allows for dependency injection,
which you can use to pass in your own scss, Handlebars, or Emogrifier
objects:
use Waggle\Factories\EmailHandlebarsFactory; use Handlebars\Handlebars; $handlebars = new Handlebars( array( 'loader' => new \Handlebars\Loader\FilesystemLoader( '/var/www/html/email-templates' ), ) ); $factory = new EmailHandlebarsFactory( null, $handlebars ); $factory->set_data( array( 'title' => 'My Awesome Email' ) ); $factory->set_css( 'h1 { font-size: 20px }' ); $factory->set_handlebars( 'my-email.handlebars' ); echo $factory->build();
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-30