theopera/twig-adapter

Installs: 78

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/theopera/twig-adapter

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

This package is auto-updated.

Last update: 2025-10-11 01:35:11 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.