2017 © Pedro Peláez
 

project dough

The Dough Templating Language

image

piestar/dough

The Dough Templating Language

  • Wednesday, August 5, 2015
  • by claar
  • Repository
  • 2 Watchers
  • 1 Stars
  • 2,832 Installations
  • Groff
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Dough Template Language

Build Status Total Downloads Latest Version License, (*1)

Dough is a tiny templating language that understands two constructs:, (*2)

  • {{ some_variable }} Normal variables (will be HTML-escaped on output), (*3)

  • {!! some_variable !!} Raw variables (will not be HTML-escaped when output), (*4)

It also allows for arrays in its data: {{ pie.name }}, (*5)

We use this for user-exposed tokens in a mail merge, where we wouldn't want the user to have access to a more complex templating language with a larger surface area to secure., (*6)

Be aware that this package does not currently protect against JavaScript or malicious HTML injection., (*7)

Examples

$mixed = DoughMixer::mix("pie is {{ pie }}"   , ['pie' => '<good>']); // "pie is &lt;good&rt;"
$mixed = DoughMixer::mix("pie is {!! pie !!}" , ['pie' => '<good>']); // "pie is <good>"
$mixed = DoughMixer::mix("Eat {{ pie.name }}!", 
                                 ['pie' => ['name' => 'Apple Pie']]); // "Eat Apple Pie!"

The Versions

05/08 2015

dev-master

9999999-dev

The Dough Templating Language

  Sources   Download

MIT

The Development Requires

template php dough templating language

05/08 2015

v1.0

1.0.0.0

The Dough Templating Language

  Sources   Download

MIT

The Development Requires

template php dough templating language