schranz-templating/laminas-latte-integration

通过 Latte 模板引擎将模板渲染器集成到 laminas。

0.1.0 2022-09-17 15:53 UTC

This package is auto-updated.

Last update: 2024-08-29 05:37:40 UTC


README

Latte Adapter集成到Laminas 框架中。

Schranz 模板项目的一部分。

安装

使用 Composer 安装此包

composer require schranz-templating/laminas-latte-integration

将模块添加到config/modules.config.php.php

return [
    // ...
    'Schranz\Templating\Integration\Laminas\Latte',
];

配置

示例和默认配置可以在config/module.config.php中找到。

扩展

要扩展 Latte 功能,您可以创建一个新的服务,该服务从Latte\Extension扩展。服务需要注册,并在module.config.php中配置其服务名称。

return [
    // ...
    'schranz_templating_latte' => [
        'extensions' => [
            \App\Latte\MyExtension::class,
            // or
            'my_extension',
        ],
    ],
];