PHPackages                             davro/fabrication - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. davro/fabrication

ActiveLibrary[Templating &amp; Views](/categories/templating)

davro/fabrication
=================

DOM based Template Engine no placeholders!

1.10(1y ago)71051[2 PRs](https://github.com/davro/fabrication/pulls)LGPL-3.0-or-laterPHPPHP &gt;=8.1CI passing

Since Jul 6Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/davro/fabrication)[ Packagist](https://packagist.org/packages/davro/fabrication)[ Docs](http://davro.net/)[ RSS](/packages/davro-fabrication/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (11)Used By (0)

Fabrication Engine
==================

[](#fabrication-engine)

Introduction
------------

[](#introduction)

PHP Template Engine based on the Document Object Model.

The FabricationEngine engine is not like most of the other templating engine's on the market, mainly because the engine has no concept of place holders, it is only concerned with elements and attributes, structures, expressions and instructions for content that requires processing.

Structures are the templates and expressions are paths to the elements contained within the Document Object Model. The FabricationEngine extends the PHP builtin DOMDocument in many ways and enables the native usage of the XPath object. This allows for an insanely flexible and extensible templating engine.

You can create a DOM structure by loading a html, xhtml, xml string or simply by loading a file, or you can build your own document structure by using the native DOMDoument API. Also there is a specifcation method with the ability to recursivly create structures. There are also some advanced dateset templating features.

Features
--------

[](#features)

Templating without place holders. Dataset Templating.

Documentation
-------------

[](#documentation)

### Example: Assign key, value pair and output.

[](#example-assign-key-value-pair-and-output)

Simple example of Input/Output.

Documentation example, [Assign](https://github.com/davro/fabrication/blob/master/docs/examples/assign.php).

```
