PHP Implementation of ZURB's Foundation for Email parser (Inky) 2018-12-01 11:12 UTC

This package is auto-updated.

Last update: 2021-11-29 02:54:51 UTC


Issue reports and pull requests will not be attended.


A PHP Implementation of ZURB's Foundation for Email parser (Inky).


You can install this bundle using composer

composer require maikschneider/inky

or add the package to your composer.json file directly.

Usage and Examples

Basic Usage.

use Hampe\Inky\Inky;

$gridColumns = 12; //optional, default is 12
$additionalComponentFactories = []; //optional
$inky = new Inky($gridColumns, $additionalComponentFactories);


Add Tag-Alias

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.


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());


See the LICENSE file for license info (it's the MIT license).