PHP Class Slackwolf\Game\Command\Command

Datei anzeigen Open project: chrisgillis/slackwolf Class Usage Examples

Protected Properties

Property Type Description
$args array
$channel string The channel ID, example: "D0HJF2J5L".
$client Slackwolf\SlackRTMClient
$game Slackwolf\Game\Game
$gameManager Slackwolf\Game\GameManager
$message Slackwolf\Message\Message
$userId Slack\string The user ID of the command executor, example: "U0H9HHZ8V"

Public Methods

Method Description
__construct ( RealTimeClient $client, GameManager $gameManager, Message $message, array $args = null ) Command constructor.
fire ( ) : void Fires the command.
init ( )

Method Details

__construct() public method

Command constructor.
public __construct ( RealTimeClient $client, GameManager $gameManager, Message $message, array $args = null )
$client Slack\RealTimeClient The Slack API client.
$gameManager Slackwolf\Game\GameManager The game manager.
$message Slackwolf\Message\Message The message object.
$args array

fire() abstract public method

Fires the command.
abstract public fire ( ) : void
return void

init() public method

public init ( )

Property Details

$args protected_oe property

protected array $args
return array

$channel protected_oe property

The channel ID, example: "D0HJF2J5L".
protected string $channel
return string

$client protected_oe property

protected SlackRTMClient,Slackwolf $client
return Slackwolf\SlackRTMClient

$game protected_oe property

protected Game,Slackwolf\Game $game
return Slackwolf\Game\Game

$gameManager protected_oe property

protected GameManager,Slackwolf\Game $gameManager
return Slackwolf\Game\GameManager

$message protected_oe property

protected Message,Slackwolf\Message $message
return Slackwolf\Message\Message

$userId protected_oe property

The user ID of the command executor, example: "U0H9HHZ8V"
protected string,Slack $userId
return Slack\string