承接 burntcaramel/icing 相关项目开发

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

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

burntcaramel/icing

最新稳定版本:1.0.0-beta5

Composer 安装命令:

composer require burntcaramel/icing

包简介

Display and customize structured icing content.

README 文档

README

PHP library for viewing Icing files. Read more about Icing here.

Example

You just need a .icing file with your content, and a specs .json file that determines how the content is displayed.

use BurntIcing\Specs;
use BurntIcing\HTMLTransformer;


$specsJSON = json_decode(file_get_contents(__DIR__. '/specs.json'), true);
$contentJSON = json_decode(file_get_contents(__DIR__. '/content.icing'), true);

$specs = new Specs($specsJSON);
$HTMLTransformer = HTMLTransformer::newTransformerWithSpecs($specs);
$HTMLTransformer->displayHTMLFromContentJSON($contentJSON);

Extensible

PHP

Subclass BlockHandler, TraitHandler, or SubsectionHandler to customise the content as it is being displayed. This is how my Blik page is displayed, with iTunes links and images interweaved in PHP on the server.

Specs JSON files

The structure is still in flux, but specs .json files allow custom block and traits to be added, with fields that get transformed into HTML. These will be handled both with this PHP library and with the React.js based Icing Editor.

Test Output

php -f tests/test.php 

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-21