enlitepro/enlite-russell-interpreter

v1.0.2 2015-05-15 08:50 UTC

This package is not auto-updated.

Last update: 2024-09-14 14:21:18 UTC


README

RussellInterpreter 模块的 ZF2 模块(https://github.com/enlitepro/russell-interpreter

安装

  1. 推荐安装方式是通过 composer。
{
    "require": {
        "enlitepro/enlite-russellInterpreter": "1.0.*"
    }
}
  1. EnliteRussellInterpreter 添加到您的 config/application.config.php 中以启用模块。

  2. InterpreterAbstractFactory 中注册解释器

'EnliteRussellInterpreters' => [
        'youInterpreter' => [
            'use_default_extensions' => true,
            'extensions' => [
                'myFavoriteFunction' => ['synonym1', 'synonym2']
            ]
        ]
    ],

使用方法

您必须在新功能中注册到 ExtensionsManagerEnliteRussellInterpreterExtensionsManager 部分

'EnliteRussellInterpreterExtensionsManager' => array(
        'invokables' => array(
            'myFavoriteFunction' => 'MyModule\Extension\MyFavoriteFunction',
        )
    )