junty/junty-plugin

用于创建 Junty 插件的包。

v0.1.1 2016-03-04 20:27 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:26:16 UTC


README

此包包含 Junty 插件的扩展。

使用方法

在您的包上安装

$ composer require junty/junty-plugin

创建插件

namespace MyNamespace;

use Junty\Plugin\PluginInterface;

class MyPlugin implements PluginInterface
{
    public function getName() : string
    {
        return 'my_plugin';
    }

    public function getCallback() : callable
    {
        return function (array $streams) {
            //...
        };
    }
}