コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function process(CommandInterface $command)
 {
     if ($command instanceof PrefixableCommandInterface) {
         $command->prefixKeys($this->prefix);
     } elseif (isset($this->commands[$commandID = strtoupper($command->getId())])) {
         call_user_func($this->commands[$commandID], $command, $this->prefix);
     }
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function process(CommandInterface $command)
 {
     if ($command instanceof PrefixableCommandInterface && $command->getArguments()) {
         $command->prefixKeys($this->prefix);
     }
 }