library glue-twig
Use twig templating engine in Glue
gluephp/glue-twig
Use twig templating engine in Glue
- Friday, May 6, 2016
- by gluephp
- Repository
- 1 Watchers
- 1 Stars
- 7 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
Twig for Glue
Use twig/twig with gluephp/glue, (*1)
Installation
Use Composer:, (*2)
$ composer require gluephp/glue-twig
$app = new Glue\App;
$app->config->override([
'twig' => [
'path' => '/absolute/path/to/templates/folder',
'config' => [
// Additional Twig config, read Twigs
// documentation for more info...
]
],
]);
Register Twig
$app->register(
new Glue\Twig\ServiceProvider()
);
Get the Twig instance
Once the service provider is registered, you can fetch the Twig instance with:, (*3)
$twig = $app->make('Twig_Environment');
or use the alias:, (*4)
$twig = $app->twig;
dev-master
9999999-dev
Use twig templating engine in Glue
Sources
Download
MIT
The Requires
by
Magnus Eriksson
dev-develop
dev-develop
Use twig templating engine in Glue
Sources
Download
MIT
The Requires
by
Magnus Eriksson
0.1.0
0.1.0.0
Use twig templating engine in Glue
Sources
Download
MIT
The Requires
by
Magnus Eriksson