Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

glaubinix/silex-twig-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

silex-twig-engine

Build status: Build Status

There are a couple of symfony components out there which depend on the EngineInterface rather then depending on a specific template engine. This allows users with a different template engine to use the features too -> YaY

Installation

The easiest way to install this library is to use Composer. Add the package "glaubinix/silex-twig-engine" to your composer.json.

{
    "require": {
        "glaubinix/silex-twig-engine": "@stable"
    }
}

Usage

// Register the twig service provider
$app->register(new \Silex\Provider\TwigServiceProvider(),
    [
    // your twig config
    ]
);

// Register the twig service provider
$app->register(new \Glaubinix\TwigEngine\TwigEngineServiceProvider());

// The engine is now available under the same identifier as in symfony
$app['templating']->render('template', []);

License

MIT

About

TwigEngine service provider for silex

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages