returns an array of BentoSearch::ResultItem objects, representing
 items.
193914
def fetch_by_issn(issn)
      xml = fetch_xml(issn)


      results = BentoSearch::Results.new.concat(
        xml.xpath("./rdf:RDF/rss:item", xml_ns).collect do |node|
          item = BentoSearch::ResultItem.new

          item.format = "Article"

          item.issn   = issn # one we searched with, we know that!

          item.title  = xml_text(node, "rss:title")
          item.link   = xml_text(node, "rss:link")

          item.publisher      = xml_text(node, "prism:publisher") || xml_text(node, "dc:publisher")
          item.source_title   = xml_text(node, "prism:PublicationName")
          item.volume         = xml_text(node, "prism:volume")
          item.issue          = xml_text(node, "prism:number")
          item.start_page     = xml_text(node, "prism:startingPage")
          item.end_page       = xml_text(node, "prism:endingPage")

          # Look for something that looks like a DOI in dc:identifier
          node.xpath("dc:identifier").each do |id_node|
            if id_node.text =~ /\ADOI (.*)\Z/
              item.doi = $1
              # doi's seem to often have garbage after a "; ", especially
              # from highwire. heuristically fix, sorry, a real DOI with "; "
              # will get corrupted.
              if (parts = item.doi.split("; ")).length > 1
                item.doi = parts.first
              end

              break
            end
          end

          # authors?
          node.xpath("dc:creator", xml_ns).each do |creator_node|
            name = creator_node.text
            name.strip!

            # author names in RSS seem to often have HTML entities,
            # un-encode them to literals.
            name = HTMLEntities.new.decode(name)


            item.authors << BentoSearch::Author.new(:display => name)
          end

          # Date is weird and various formatted, we do our best to
          # look for yyyy-mm-dd at the beginning of either prism:coverDate or
          # dc:date or prism:publicationDate
          date_node = xml_text(node, "prism:coverDate") || xml_text(node, "dc:date") || xml_text(node, "prism:publicationDate")
          if date_node && date_node =~ /\A(\d\d\d\d-\d\d-\d\d)/
            item.publication_date = Date.strptime( $1, "%Y-%m-%d")
          elsif date_node
            # Let's try a random parse, they give us all kinds of things I'm afraid
            item.publication_date = Date.parse(date_node) rescue ArgumentError
          end

          # abstract, we need to strip possible HTML tags (sometimes they're
          # there, sometimes not), and also decode HTML entities. 
          item.abstract   = xml_text(node, "rss:description").try do |text|            
            HTMLEntities.new.decode(strip_tags(text))
          end

          item
        end
      )

      # Items seem to come back in arbitrary order, we want to sort
      # by date reverse if we can
      if results.all? {|i| i.publication_date.present? }
        results.sort_by! {|i| i.publication_date}.reverse!
      end

      fill_in_search_metadata_for(results)

      return results
    end
443505
public function createSearchResults(array $results)
    {
        $created = array();
        foreach ($results as $key => $result) {
            $created[$key] = $this->createResult('Packagist\Api\Result\Result', $result);
        }

        return $created;
    }
1196885
protected function results()
    {
        $results = [];
        
        if (is_array($this->data)) {
            if ($this->singleMode) {
                if ($this->singleModeBottom) {
                    if (isset($this->data[0])) {
                        return [$this->singleResult($this->data[0], $this->singleMode)];
                    }
                }
            } else {
                foreach ($this->data as $data) {
                    $results[] = $this->singleResult($data, $this->singleMode);
                }
            }
        }
        
        return $results;
    }
169185
public function getItems()
    {
        $state = $this->state;

        return $this->once('items', function () use ($state) {
            $files = $this->getFiles();

            if (!$files) {
                return [];
            }

            $limit = $state->get('list.limit', 100);
            $items = [];

            /** @var \SplFileInfo $file */
            foreach ($files as $file) {
                $item = unserialize(file_get_contents($file->getPathname()));

                $item['id'] = $file->getBasename();

                $items[$file->getMTime()] = $item;
            }

            krsort($items);

            $result = array_slice($items, 0, $limit);

            return $result;
        });
    }
974213
public function getItems() {
		$batch = $this->getBatch();
		$items = array();
		foreach ($batch as $b) {
			$items[] = $b;
		}
		return $items;
	}
204708
protected function collectionFromResult($result)
    {
        // If we have one result which is not an assoc array, make it the first element of an array for the
        // collectionFromResult function so we always return a collection from filter
        if ((bool) count(array_filter(array_keys($result), 'is_string'))) {
            $result = [$result];
        }

        $class = $this->class;
        $collection = [];

        foreach ($result as $r) {
            $collection[] = new $class($this->connection, $r);
        }

        return $collection;
    }
101298
public function getList()
    {
        $objects = $this->manager->findAll();
        $this->addPaginationData($objects);
        $objects = $objects->getItems();
        if (empty($objects)) {
            $this->addInfoMessage(self::INFO_NO_ENTRIES_FOUND);
        }
        return $objects;
    }
1252409
def items(self):
        """"""
        if self._result_cache:
            return self._result_cache.items

        return self.all().items
1370103
public function toArray(): array
	{
		$results = [];

		foreach($this->items as $item)
		{
			$results[] = $item->toArray();
		}

		return $results;
	}
433630
protected function getAll($result = [])
    {

        if (array_key_exists("hits", $result)) {

            $new = [];

            foreach ($result["hits"]["hits"] as $row) {

                $model = $this->model ? new $this->model($row["_source"], true) : new Model($row["_source"], true);

                $model->setConnection($model->getConnection());
                $model->setIndex($row["_index"]);
                $model->setType($row["_type"]);

                // match earlier version

                $model->_index = $row["_index"];
                $model->_type = $row["_type"];
                $model->_id = $row["_id"];
                $model->_score = $row["_score"];

                $new[] = $model;
            }

            $new = new Collection($new);

            $new->total = $result["hits"]["total"];
            $new->max_score = $result["hits"]["max_score"];
            $new->took = $result["took"];
            $new->timed_out = $result["timed_out"];
            $new->scroll_id = isset($result["_scroll_id"]) ? $result["_scroll_id"] : NULL;
            $new->shards = (object)$result["_shards"];

            return $new;

        } else {

            return new Collection([]);

        }
    }
1327808
def getItems(self, sort=False, reverse=False,  selector=None):
        
        selector = (lambda fgi: fgi.isValid) if selector is None else selector
        _container = {'_': self.container}
        return _getItems(_container, '_', sort, reverse, selector)
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;
    }
210621
public function getSuccessfullyResults(): ResultCollection
    {
        $successfullyResults = array_filter($this->results, function (Result $result) {
            return $result->isSuccessfully();
        });

        return new self(...$successfullyResults);
    }
387134
public function getItems()
    {
        $items = new ArrayList();

        // If the value has been set, use that
        if ($this->value != 'unchanged') {
            $sourceObject = $this->getSourceObject();
            if (is_array($sourceObject)) {
                $values = is_array($this->value) ? $this->value : preg_split('/ *, */', trim($this->value));

                foreach ($values as $value) {
                    $item = new stdClass;
                    $item->ID = $value;
                    $item->Title = $sourceObject[$value];
                    $items->push($item);
                }
                return $items;
            }

            // Otherwise, look data up from the linked relation
            if (is_string($this->value)) {
                $ids = explode(',', $this->value);
                foreach ($ids as $id) {
                    if (!is_numeric($id)) {
                        continue;
                    }
                    $item = DataObject::get_by_id($sourceObject, $id);
                    if ($item) {
                        $items->push($item);
                    }
                }
                return $items;
            }
        }

        if ($this->form) {
            $fieldName = $this->name;
            $record = $this->form->getRecord();
            if (is_object($record) && $record->hasMethod($fieldName)) {
                return $record->$fieldName();
            }
        }

        return $items;
    }
480068
public function getItems(): array
    {
        $available = [];
        $assigned = [];

        if ($this->type == Item::TYPE_ROLE) {
            foreach (array_keys($this->manager->getRoles()) as $name) {
                $available[$name] = 'role';
            }
        }
        foreach (array_keys($this->manager->getPermissions()) as $name) {
            $available[$name] = $name[0] == '/' ? 'route' : 'permission';
        }

        foreach ($this->manager->getChildren($this->_item->name) as $item) {
            $assigned[$item->name] = $item->type == 1 ? 'role' : ($item->name[0] == '/' ? 'route' : 'permission');
            unset($available[$item->name]);
        }

        unset($available[$this->name]);

        return [
            'available' => $available,
            'assigned' => $assigned,
        ];
    }
811313
public function getItems(): array
    {
        $allItems = [];

        while ($this->queue) {
            $commands = $this->prepareCommands();
            $pool = new CommandPool($this->client, $commands, [
                'concurrency' => $this->poolSize,
                'fulfilled'   => function (ResultInterface $result) use (&$allItems) {
                    if ($result->hasKey('UnprocessedKeys')) {
                        $this->retryUnprocessed($result['UnprocessedKeys']);
                    }

                    foreach ((array)$result->get('Responses') as $tableName => $items) {
                        $allItems = array_merge($allItems, $items);
                    }
                },
                'rejected'    => function ($reason) {
                    if ($reason instanceof AwsException) {
                        if ('ProvisionedThroughputExceededException' === $reason->getAwsErrorCode()) {
                            $this->retryUnprocessed($reason->getCommand()['RequestItems']);
                            return;
                        }

                        if (is_callable($this->errorFunc)) {
                            $func = $this->errorFunc;
                            $func($reason);
                        }
                    }
                },
            ]);

            $pool->promise()->wait();
        }

        return $allItems;
    }
115451
function getResults(result, objects) {
		
		// if there are no results, resolve an empty array
		if (!result) {
			return new Promise(function(resolve, reject) {
				resolve([]);
			});
		}
		
		// if the result object is undefined or not an array, make it one
		result.objects = result.objects || [];
		result.objects = Array.isArray(result.objects) ? result.objects : [result.objects];
		objects        = _.union(objects, result.objects);
		
		// if the result has a token, there are more results, continue to get them
		if (result.token) {
			return _client.method('ContinueRetrievePropertiesEx', {
				_this: _client._sc.propertyCollector,
				token: result.token
			})
			.then(function(results) {
				return getResults(results, objects);
			});
		}
		
		// if there are no more results, return the formatted results
		else {
			return new Promise(function(resolve, reject) {
				resolve(env.format(objects));
			});
		}
	}