2017 © Pedro Peláez
 

library icing

Display and customize structured icing content.

image

burntcaramel/icing

Display and customize structured icing content.

  • Tuesday, May 5, 2015
  • by BurntCaramel
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

IcingPHP

PHP library for viewing Icing files. Read more about Icing here., (*1)

Example

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

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., (*3)

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., (*4)

Test Output

php -f tests/test.php 

The Versions

05/05 2015

dev-master

9999999-dev

Display and customize structured icing content.

  Sources   Download

MIT

The Requires

 

html text content icing display glaze

15/04 2015

1.0.0-beta5

1.0.0.0-beta5

Display and customize structured icing content.

  Sources   Download

MIT

The Requires

 

html text content icing display glaze

15/04 2015

1.0.0-beta4

1.0.0.0-beta4

Display and customize structured icing content.

  Sources   Download

MIT

The Requires

 

html text content icing display glaze

15/04 2015

1.0.0-beta3

1.0.0.0-beta3

Display and customize icing content.

  Sources   Download

MIT

The Requires

 

html text content icing display glaze

07/04 2015

1.0.0-beta2

1.0.0.0-beta2

Display and customize icing content.

  Sources   Download

MIT

The Requires

 

html text content icing display glaze

21/03 2015

1.0.0-beta

1.0.0.0-beta

Display and customize icing content.

  Sources   Download

MIT

The Requires

 

html text content icing display glaze