theopera/twig-adapter

v1.3 2019-08-10 12:34 UTC

This package is auto-updated.

Last update: 2024-11-10 23:38:37 UTC


README

Build Status

This adapter allows you to easily use the Twig template engine for rendering your views.

Installation

Run composer require theopera/twig-adapter to get a copy of the adapter. To make the adapter active, add the following code, to the MyContext class.

public function getTemplateEngine() : RenderInterface
{
    if($this->render === null){
        $this->render = new TwigAdapter($this);
    }
    
    return $this->render;
}

This will override the default PhpEngine template engine. Be sure to check your import statements.