/**
  * Will register the combination to the items
  *
  * @return void
  */
 protected function registerCombinationToItems()
 {
     $this->itemOne->addItemCombination($this);
     $this->itemOne->addAction($this->action);
 }
示例#2
0
 /**
  * Check whether an item matches a specific input
  * @param Game\AbstractItem $item
  *
  * @return Game\AbstractItem
  */
 protected function getItemForAction(AbstractItem $item)
 {
     if (stripos($this->parsedInput, $item->getName()) !== false) {
         $this->parsedInput = str_ireplace($item->getName(), '', $this->parsedInput);
         return $item;
     }
     return false;
 }