Returns the items similar to the given item.

@param string $items
@param int    $itemCount

@return string JSON response
504779
public function getSimilarItems($items, $itemCount = 3)
    {
        if (!is_array($items)) {
            $items = [$items];
        }

        $response = $this->sendQuery(['items' => $items, 'num' => intval($itemCount)]);

        return $response;
    }
984509
public function getUsers($items)
  {
    $result = [];
    foreach ($items as $item) {
      $result[] = new User($item);
    }

    return $result;
  }
865453
protected function getArrayableItems($items)
    {
        if (is_array($items)) {
            return $items;
        }

        if ($items instanceof Traversable) {
            return iterator_to_array($items);
        }

        return (array) $items;
    }
184006
private function getItems($itemValues, string $itemType): array
    {
        $items = [];

        foreach ((array) $itemValues as $itemValue) {
            try {
                $backend = $this->backendRegistry->getBackend($itemType);
                $item = $backend->loadItem($itemValue);
                $items[$item->getValue()] = $item;
            } catch (NotFoundException $e) {
                // Do nothing
            }
        }

        return $items;
    }
842118
public static function GetItemInfo($itemname, $itemchunks)
  {
    $retval = "-";
    for ($i=0;$i<count($itemchunks);$i++)
    if (strcasecmp($itemchunks[$i], $itemname) == 0) $retval = $itemchunks[$i+1];
    return  $retval;
  }
1075264
public function searchIn(array $items = [])
    {
        if (\is_null($slug = $this->slug)) {
            return \array_search($this->value, $items);
        }

        return \array_search($slug, $items);
    }
442692
public function itemList($user_id)
    {
        $response = $this->getGuzzleClient()
            ->get('/users/' . $user_id . '/items/search', $this->setQuery());

        return $this->serializer->deserialize(
            $response->getBody()->getContents(),
            ItemList::class,
            'json'
        );
    }
834349
public static function getArrayableItems($items)
    {
        if ($items instanceof ManagesItemsTrait || $items instanceof ManagesItemsInterface) {
            return $items->getAll();

        } elseif ($items instanceof Traversable) {
            return iterator_to_array($items);
        }

        return (array)$items;
    }
623455
public function getItems($offset, $itemCountPerPage)
    {
        $this->cursor->skip($offset);
        $this->cursor->limit($itemCountPerPage);

        $resultSet = clone $this->resultSetPrototype;
        $resultSet->initialize($this->cursor);

        return $resultSet;
    }
725777
public function itemRelist($item_id, $fields)
    {
        // TODO: Tests
        $response = $this->getGuzzleClient()
            ->post(
                '/items/' . $item_id . '/relist',
                array_merge(
                    $this->setQuery(),
                    $this->setBodyArray($fields)
                )
            );

        return $this->serializer->deserialize(
            $response->getBody()->getContents(),
            Item::class,
            'json'
        );
    }
1166136
protected function processItems(array $items)
    {
        $processedItems = [];

        foreach ($items as $entry) {
            $processedItems[] = new Account($entry);
        }

        return $processedItems;
    }
1350946
public function getItems($offset, $itemCountPerPage)
    {
        $qb = $this->getQueryBuilder();
        $qb->setFirstResult($offset)->setMaxResults($itemCountPerPage);

        return $qb->getQuery()->getArrayResult();
    }
650976
public static function groupBy($items, $key)
    {
        $array = array();

        foreach ($items as $item) {
            $value = self::getValue($item, $key);
            if (!isset($array[$value])) {
                $array[$value] = array();
            }
            $array[$value][] = $item;
        }

        return $array;
    }
1305646
public function countItems($items)
    {
        if ($this->_count) {
            return $this->_count;
        }
        $this->_count($items);

        return $this->_count;
    }
18992
public static function getItemDescriptionByKey($itemKey)
    {
        $itemKey = strtoupper($itemKey);
        if (isset(self::$availableItemKeysList[$itemKey])) {
            return self::$availableItemKeysList[$itemKey];
        } else {
            return false;
        }
    }
7555
public static function items($type)
	{
		if(!isset(self::$_items[$type]))
			self::loadItems($type);
		return self::$_items[$type];
	}
980237
public T match(Collection<I> items)
    {
        for (I item : items)
        {
            T match = match(item);
            if (match != null)
            {
                return match;
            }
        }
        return null;
    }