PHP Класс Crummy\Phlack\Bot\Mainframe\Mainframe

Наследование: implements Crummy\Phlack\Common\Executable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( ) Constructor.
attach ( Crummy\Phlack\Bot\BotInterface $bot, Crummy\Phlack\Common\Matcher\MatcherInterface | callable $matcher = null, integer $priority ) : self
execute ( Crummy\Phlack\WebHook\CommandInterface $command ) : Packet
getListener ( Crummy\Phlack\Bot\BotInterface $bot, Crummy\Phlack\Common\Matcher\MatcherInterface | callable $matcher ) : Closure

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( )

attach() публичный Метод

public attach ( Crummy\Phlack\Bot\BotInterface $bot, Crummy\Phlack\Common\Matcher\MatcherInterface | callable $matcher = null, integer $priority ) : self
$bot Crummy\Phlack\Bot\BotInterface
$matcher Crummy\Phlack\Common\Matcher\MatcherInterface | callable If callable, it should accept a CommandInterface and return a boolean.
$priority integer
Результат self

execute() публичный Метод

public execute ( Crummy\Phlack\WebHook\CommandInterface $command ) : Packet
$command Crummy\Phlack\WebHook\CommandInterface
Результат Packet

getListener() публичный Метод

public getListener ( Crummy\Phlack\Bot\BotInterface $bot, Crummy\Phlack\Common\Matcher\MatcherInterface | callable $matcher ) : Closure
$bot Crummy\Phlack\Bot\BotInterface
$matcher Crummy\Phlack\Common\Matcher\MatcherInterface | callable If callable, it should accept a CommandInterface and return a boolean.
Результат Closure An anonymous function to be attached to the internal cpu.