Crummy\Phlack\Common\Matcher\CommandNameMatcher::matches PHP Method

matches() public method

public matches ( Crummy\Phlack\WebHook\CommandInterface $command ) : boolean
$command Crummy\Phlack\WebHook\CommandInterface
return boolean
    public function matches(CommandInterface $command)
    {
        return $this->getCommandName() === $command->get('command');
    }

Usage Example

Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function matches(CommandInterface $command)
 {
     return null === $this->commandName ? $command instanceof SlashCommand : $command instanceof SlashCommand && parent::matches($command);
 }