PHP Class Crummy\Phlack\Bot\AbstractBot

Inheritance: implements BotInterface, implements Crummy\Phlack\Common\Matcher\MatcherAggregate
Datei anzeigen Open project: mcrumm/phlack Class Usage Examples

Public Methods

Method Description
__construct ( Crummy\Phlack\Common\Matcher\MatcherInterface $matcher = null, array | Crummy\Phlack\Common\Responder\ResponderInterface $options = [] )
getMatcher ( ) : Crummy\Phlack\Common\Matcher\MatcherInterface | callable
setMatcher ( Crummy\Phlack\Common\Matcher\MatcherInterface $matcher )

Protected Methods

Method Description
emote ( string $text ) : Reply
reply ( Crummy\Phlack\WebHook\CommandInterface $user, string $text ) : Reply
say ( string $text ) : Reply
send ( Crummy\Phlack\Message\MessageInterface $message ) : EmptyReply
shout ( string $text ) : Reply
tell ( string $user, string $text ) : Reply

Method Details

__construct() public method

public __construct ( Crummy\Phlack\Common\Matcher\MatcherInterface $matcher = null, array | Crummy\Phlack\Common\Responder\ResponderInterface $options = [] )
$matcher Crummy\Phlack\Common\Matcher\MatcherInterface
$options array | Crummy\Phlack\Common\Responder\ResponderInterface

emote() protected method

protected emote ( string $text ) : Reply
$text string
return Crummy\Phlack\WebHook\Reply\Reply

getMatcher() public method

public getMatcher ( ) : Crummy\Phlack\Common\Matcher\MatcherInterface | callable
return Crummy\Phlack\Common\Matcher\MatcherInterface | callable

reply() protected method

protected reply ( Crummy\Phlack\WebHook\CommandInterface $user, string $text ) : Reply
$user Crummy\Phlack\WebHook\CommandInterface The user_id, or a CommandInterface to inspect.
$text string
return Crummy\Phlack\WebHook\Reply\Reply

say() protected method

protected say ( string $text ) : Reply
$text string
return Crummy\Phlack\WebHook\Reply\Reply

send() protected method

protected send ( Crummy\Phlack\Message\MessageInterface $message ) : EmptyReply
$message Crummy\Phlack\Message\MessageInterface
return Crummy\Phlack\WebHook\Reply\EmptyReply

setMatcher() public method

public setMatcher ( Crummy\Phlack\Common\Matcher\MatcherInterface $matcher )
$matcher Crummy\Phlack\Common\Matcher\MatcherInterface

shout() protected method

protected shout ( string $text ) : Reply
$text string
return Crummy\Phlack\WebHook\Reply\Reply

tell() protected method

protected tell ( string $user, string $text ) : Reply
$user string The user_id to tell
$text string
return Crummy\Phlack\WebHook\Reply\Reply