schranz-templating/mezzio-mustache-integration

A integration of template renderer into mezzio via mustache template engine.

0.1.0 2022-11-06 17:02 UTC

This package is auto-updated.

Last update: 2024-10-29 06:41:50 UTC


README

Integrate the templating Mustache Adapter into the Mezzio Framework.

Part of the Schranz Templating Project.

Installation

Install this package via Composer:

composer require schranz-templating/mezzio-mustache-integration

Register the ConfigProvider class in your config/config.php if not already automatically added by the framework:

// ...

$aggregator = new ConfigAggregator([
    // ...
    \Schranz\Templating\Integration\Mezzio\Mustache\ConfigProvider::class,
]);

Configuration

The following configuration is available:

// src/App/src/ConfigProvider.php

class ConfigProvider
{
    public function __invoke(): array
    {
        return [
            // ...
            'mustache' => [
                'path' => 'src/App/templates',
                'cache_dir' => 'data/cache/mustache',
            ],
        ];
    }
}