Пример #1
0
 /**
  * Get all the results matching one of the given types
  * @param array ...$types
  * @return ItemPosition[]
  */
 public function getResultsByType($types)
 {
     $types = func_get_args();
     $items = new ResultSet();
     foreach ($this->items as $item) {
         if (call_user_func_array([$item, 'is'], $types)) {
             $items->addItem($item);
         }
     }
     return $items;
 }