Botman 的简单命令行封装,无需 Laravel 组件。

0.1.0 2017-10-06 22:23 UTC

This package is auto-updated.

Last update: 2020-07-29 05:48:24 UTC


README

概述

这是一个围绕 botman 的简单封装,可以创建一个简单的 CLI 驱动文本界面到您的 botman。非常适合快速测试 botman。

这类似于 tinker,但更简单,且不要求那么多的依赖项,但需要 PHP 配置了 readline 扩展。这在 PHP 交互式壳中很常见,但您可能需要安装一个额外的 readline 包(例如 php7.0-readline)。

如何使用

简单地在项目中包含(使用 composer require scottaubrey/robin)并编写 CLI 入口点,如下所示

#!/usr/bin/env php
<?php
use Robin\Robin;

//get your configure botman, for example from a service locator
require_once(__DIR__."/bootstrap.php");
$botman = $services->get("Botman\Botman\Botman");

$robin = new Robin($botman);
$robin->run();

然后简单地 chmod +x 并运行!

许可证

Robin 在 MIT 许可证下授权