PHPackages                             eric-chau/twig-skill - 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. eric-chau/twig-skill

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

eric-chau/twig-skill
====================

v1.0.1(9y ago)0108PHP

Since Oct 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/eric-chau/twig-skill)[ Packagist](https://packagist.org/packages/eric-chau/twig-skill)[ RSS](/packages/eric-chau-twig-skill/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Twig skill
==========

[](#twig-skill)

This skill is an integration of `Twig` into Jarvis micro-framework.

What it brings
--------------

[](#what-it-brings)

When this skill is enabled, it brings:

- `$app['twig']` service, an unique instance of `\Twig_Environment`.
- On `$app['twig']` first call, the event `Jarvis\Skill\Twig\TwigReadyEvent` (event name: `twig.ready`) will be broadcasted. Note that `TwigReadyEvent` is a permanent event.
- In all Twig templates, the variable `router` (=`$app['router']`) is available.

Configuration options
---------------------

[](#configuration-options)

You must add a 'twig' key in the 'extra' section to pass your options:

```
