Get Items from a feed.

@return array Returns an array of Items
198064
public function getItems()
  {
    $namespaces = $this->xml->getDocNamespaces();
    foreach($namespaces as $namespace => $url)
    {
      $this->xml->registerXPathNamespace($namespace, $url);
    }

    foreach ($this->xml->xpath($this->itemXpath) as $item)
    {
      $this->items[] = new Item
      (
        $this->itemtitleXpath ? (string) $item->xpath($this->itemtitleXpath)[0] : NULL,
        $this->itemtorrenturlXpath ? (string) $item->xpath($this->itemtorrenturlXpath)[0] : NULL,
        $this->itemmagnetXpath ? (string) $item->xpath($this->itemmagnetXpath)[0] : NULL
      );
    }

    return $this->items;
  }
1370103
public function toArray(): array
	{
		$results = [];

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

		return $results;
	}
669513
public function getFeedItems($max = null)
    {
        $itemCount = count($this->feed->channel->item);
        $max = is_integer($max) && $max < $itemCount ? $max : $itemCount;
        $items = [];

        for ($i = 0; $i < $max; ++$i) {
            $item = new FeedItem();
            $item->setTitle($this->feed->channel->item[$i]->title);
            $item->setDescription($this->feed->channel->item[$i]->description);
            $item->setLink($this->feed->channel->item[$i]->link);
            $item->setAuthor($this->feed->channel->item[$i]->author);
            $item->setDate($this->feed->channel->item[$i]->pubDate);
            $item->setGuid($this->feed->channel->item[$i]->guid);
            $items[] = $item;
        }

        return $items;
    }
68965
public function getFeedItems($max = null)
    {
        $itemCount = count($this->feed->entry);
        $max = is_integer($max) && $max < $itemCount ? $max : $itemCount;
        $items = [];

        for ($i = 0; $i < $max; ++$i) {
            $item = new FeedItem();
            $item->setTitle($this->feed->entry[$i]->title);
            $item->setDescription(
                $this->feed->entry[$i]->summary ?: $this->feed->entry[$i]->content
            );
            $item->setLink($this->feed->entry[$i]->link['href']);
            $item->setAuthor($this->feed->entry[$i]->author->name);
            $item->setDate($this->feed->entry[$i]->updated);
            $item->setGuid($this->feed->entry[$i]->id);
            $items[] = $item;
        }

        return $items;
    }
1308705
protected function _getItemsData()
    {
        $items = [];

        /** @var \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection $productCollection */
        $productCollection = $this->getLayer()->getProductCollection();
        $optionsFacetedData = $productCollection->getFacetedData('categories');

        $currentCategory = $this->dataProvider->getCategory();
        $categories = $this->getChildrenCategories();

        if ($currentCategory->getIsActive()) {
            foreach ($categories as $category) {
                if (isset($optionsFacetedData[(int) $category->getId()])) {
                    $productCount = $optionsFacetedData[$category->getId()]['count'];
                    if ($category->getIsActive() && $productCount > 0) {
                        $item = [
                            'label' => $this->escaper->escapeHtml($category->getName()),
                            'value' => $category->getId(),
                            'count' => $optionsFacetedData[$category->getId()]['count'],
                            'url'   => $category->getUrl(),
                        ];

                        $items[] = $item;
                    }
                }
            }
        }

        return $items;
    }
501644
public function getBrowsers()
    {
        $period = $this->analyticsDuration();
        $data = Analytics::fetchTopBrowsers($period)->toArray();

        $items = [];
        shuffle($data); // shuffle results / randomimize chart color sections
        foreach ($data as $k => $item) {
            $items[] = $this->getPieDataSet($item['browser'], $item['sessions'], $k);
        }

        return $items;
    }
1265363
public function toArray(): array
    {
        return array_map(function ($value) {
            if (method_exists($value, 'toArray')) {
                return $value->toArray();
            }

            return $value;
        }, $this->items);
    }
939682
public function getItems()
    {
        if (count($this->items) > $this->itemsPerPage) {
            $items = [];
            $counter = 0;
            foreach ($this->items as $key => $value) {
                $items[$key] = $value;
                $counter++;
                if ($counter == $this->itemsPerPage) {
                    return $items;
                }
            }
        }

        return $this->items;
    }
837904
public function get_items() {
        if (!isset($this->data[Parser::INDEX_CHILDREN_SPEC])) {
            return array();
        }

        $items = array();
        foreach ($this->data[Parser::INDEX_CHILDREN_SPEC] as $k => $data) {
            $items[] = $this->api->get_item($data['value']);
        }
        
        return $items;
    }
593399
protected function collectItems()
    {
        $items = [];

        foreach ($this->_layout as $row => $unused) {
            foreach ($this->_layout[$row] as $column => $item) {
                $items[] = $item;
            }
        }

        return $items;
    }
138764
protected function getItemsFromDatabase()
    {
        $brandId = $this->repository->make('antares.memory')->make('primary')->get('brand.default');
        if (auth()->guest()) {
            return [];
        }
        $roleId = auth()->user()->roles->first()->id;
        $items  = $this->resolver()->where(['brand_id' => $brandId, 'role_id' => $roleId])->get();
        $return = [];

        foreach ($items as $item) {
            $form       = $item->form;
            $attributes = array_merge($item->getAttributes(), ['action_id' => $form->action_id, 'name' => $form->name]);
            array_push($return, $attributes);
        }
        return $return;
    }
66425
public function retrieve_items( $look_at = false ) {
		$json = \call_user_func( $this->feed_callback, $this->url );
		$raw  = $this->parse_feed( $json );

		$this->items = $raw;
		if ( $look_at !== false ) {
			$this->items = $raw[ $look_at ];
		}
	}
256871
public function items()
    {
        return [
            'home'  => [
                'title' => trans('dashboard::menus.principal.home'),
                'url'   => '#home',
                'data-scroll' => true
            ],
            'about'  => [
                'title' => trans('dashboard::menus.principal.about'),
                'url'   => '#about',
                'data-scroll' => true
            ],
            'team'  => [
                'title' => trans('dashboard::menus.principal.team'),
                'url'   => '#team',
                'data-scroll' => true
            ],
            'services'  => [
                'title' => trans('dashboard::menus.principal.services'),
                'url'   => '#services',
                'data-scroll' => true
            ],
            'platform'  => [
                'title' => trans('dashboard::menus.principal.platform'),
                'url'   => route('auth.loginGet'),
                'data-scroll' => true
            ],
            'contact'  => [
                'title' => trans('dashboard::menus.principal.contact'),
                'url'   => '#contact',
                'data-scroll' => true
            ],
            'facebook'  => [
                'url'   => '#',
                'icon'  => 'fa fa-facebook',
            ],
            'twitter'  => [
                'url'   => '#',
                'icon'  => 'fa fa-twitter',
            ],
            'google'  => [
                'url'   => '#',
                'icon'  => 'fa fa-google',
            ],
        ];
    }
1057708
private static List<FeedItem> getFeedItems(AdWordsServicesInterface adWordsServices,
      AdWordsSession session, Feed feed) throws RemoteException {
    // Get the FeedItemService.
    FeedItemServiceInterface feedItemService =
        adWordsServices.get(session, FeedItemServiceInterface.class);
    String query = String.format(
        "SELECT FeedItemId, AttributeValues WHERE Status = 'ENABLED' AND FeedId = %d",
        feed.getId());

    List<FeedItem> feedItems = new ArrayList<>();
    int offset = 0;
    FeedItemPage feedItemPage;

    do {
      String pageQuery = String.format(query + " LIMIT %d, %d", offset, PAGE_SIZE);
      feedItemPage = feedItemService.query(pageQuery);
      if (feedItemPage.getEntries() != null) {
        feedItems.addAll(Arrays.asList(feedItemPage.getEntries()));
      }
      offset += PAGE_SIZE;
    } while (offset < feedItemPage.getTotalNumEntries());

    return feedItems;
  }
843262
public function getItems()
    {
        $manager = Yii::$app->getAuthManager();
        $avaliable = [];
        foreach (array_keys($manager->getRoles()) as $name) {
            $avaliable[$name] = 'role';
        }

        foreach (array_keys($manager->getPermissions()) as $name) {
            if ($name[0] != '/') {
                $avaliable[$name] = 'permission';
            }
        }

        $assigned = [];
        foreach ($manager->getAssignments($this->id) as $item) {
            $assigned[$item->roleName] = $avaliable[$item->roleName];
            unset($avaliable[$item->roleName]);
        }

        return [
            'avaliable' => $avaliable,
            'assigned' => $assigned
        ];
    }
559341
public function getItems()
    {
        if (!$this->itemsChanged && $this->cacheItems && count($this->cacheItems) === count($this->entity->getItems())) {
            return $this->cacheItems;
        } else {
            $this->itemsChanged = false;
            $this->cacheItems = array();
            foreach ($this->entity->getItems() as $item) {
                $this->cacheItems[] = $this->itemFactory->createApiEntity($item, $this->locale, $this->getCurrencyCode());
            }
        }

        return $this->cacheItems;
    }
371503
public function getAllItems() {
    if (version_compare(phpversion(), '5.3.0', '<')) {
      return json_encode($this->m_aItems);
    }
    else {
      return json_encode($this->m_aItems, JSON_UNESCAPED_UNICODE);
    }
  }