Slack\Message\Message::getText PHP Method

getText() public method

Get text
public getText ( ) : string
return string
    public function getText()
    {
        return $this->text;
    }

Usage Example

Example #1
0
 /**
  * @param Message $message
  * @return string
  */
 public function execute(Message $message)
 {
     $commandName = explode(' ', $message->getText())[0];
     if ($this->isCommandNative($commandName)) {
         return $this->processNativeCommands($commandName);
     }
     if ($this->isCommandExists($commandName)) {
         $command = $this->commandList[$commandName];
         return $command->execute($message);
     } else {
         return sprintf("Command '%s' is not exists.", $commandName);
     }
 }
All Usage Examples Of Slack\Message\Message::getText