This method return an collection of items for a page.

@param  integer $offset
@param  integer $limit
@param \Cmf\System\Sort $sort
@return array
331010
public function getItems($offset, $limit, $sort = null)
    {
        $items = [];
        $cnt = count($this->rawData);
        for ($i = $offset; $i < $offset + $limit && $i < $cnt; $i++) {
            $items[] = $this->rawData[$i];
        }

        return $items;
    }
112274
public function getObjectsWithCollections($limit, $offset)
    {
        $contentIdsQuery = $this->connection->createQueryBuilder();
        $contentIdsQuery
            ->select("DISTINCT contentobject_id AS id")
            ->from($this->connection->quoteIdentifier('ezinfocollection'));

        $statement = $contentIdsQuery->execute();

        $contents = [];
        foreach ($statement->fetchAll() as $content) {
            $contents[] = (int)$content['id'];
        }

        if (empty($contents)) {
            return [];
        }

        $query = $this->connection->createQueryBuilder();
        $query
            ->select(
                "eco.id AS content_id",
                "ecot.main_node_id"
            )
            ->from($this->connection->quoteIdentifier('ezcontentobject'), 'eco')
            ->leftJoin(
                'eco',
                $this->connection->quoteIdentifier('ezcontentobject_tree'),
                'ecot',
                $query->expr()->eq(
                    $this->connection->quoteIdentifier('eco.id'),
                    $this->connection->quoteIdentifier('ecot.contentobject_id')
                )
            )
            ->innerJoin(
                'eco',
                $this->connection->quoteIdentifier('ezcontentclass'),
                'ecc',
                $query->expr()->eq(
                    $this->connection->quoteIdentifier('eco.contentclass_id'),
                    $this->connection->quoteIdentifier('ecc.id')
                )
            )
            ->where(
                $query->expr()->eq('ecc.version', 0)
            )
            ->andWhere($query->expr()->in('eco.id', $contents))
            ->groupBy([
                $this->connection->quoteIdentifier('ecot.main_node_id'),
                $this->connection->quoteIdentifier('content_id'),
            ])
            ->setFirstResult($offset)
            ->setMaxResults($limit);

        $statement = $query->execute();

        return $statement->fetchAll(PDO::FETCH_ASSOC);
    }
1217853
public function all($offset = 0, $limit = 15)
    {
        $results = array_slice($this->memory, $offset, $limit);

        foreach ($results as $key => $value) {
            $results[$key] = json_decode($value[self::SUMMARY_KEY]);
        }

        return $results;
    }
307069
public function loadAll($offset = 0, $limit = -1)
    {
        $spiUrlWildcards = $this->urlWildcardHandler->loadAll(
            $offset,
            $limit
        );

        $urlWildcards = array();
        foreach ($spiUrlWildcards as $spiUrlWildcard) {
            $urlWildcards[] = $this->buildUrlWildcardDomainObject($spiUrlWildcard);
        }

        return $urlWildcards;
    }
265405
public function getArticles($limit = 100, $offset = 0)
    {
        /** @var ArticleFbApi $response */
        $response = $this->call(new Request('article.get', array(), $limit, $offset), 'DVelopment\FastBill\Model\ArticleFbApi');

        return $response->getResponse()->getArticles();
    }
773071
public function findRelevantEvents($offset, $limit)
    {
        $query = $this->prepareRelevantEventsQuery();

        $query->getQueryBuilder()->setFirstResult($offset);
        $query->getQueryBuilder()->setMaxResults($limit);

        return $query->execute();
    }
1006194
public function findAllWithPagination($filters, $limit, $offset, $resultInArray = FALSE)
    {
        $where = $this->getQueryFilter($filters);
        $query = $this->getEntityManager()->createQuery('SELECT m FROM FulgurioLightCMSBundle:Media m ' . $where . ' ORDER BY m.created_at DESC')->setMaxResults($limit)->setFirstResult($offset);
        if (!empty($filters))
        {
            foreach ($filters as $filterKey => $filterValue)
            {
                $query->setParameter($filterKey, $filterValue);
            }
        }
        if ($resultInArray)
        {
            return $query->getArrayResult();
        }
        return $query->getResult();
    }
316395
public function getContacts($limit = NULL, $offset = NULL) {
    $parameters = array();
    if (!empty($limit)) {
      $parameters['limit'] = $limit;
      if (!empty($offset)) {
        $parameters['offset'] = $offset;
      }
    }
    $data = $this->request('GET', 'contacts', $parameters);
    return $data->contacts;
  }
444305
public function getListFields($list, $offset = 0, $limit = 100)
	{
		$fields = [];
		foreach ($this->client->get("lists/{$list}/fields?offset={$offset}&limit={$limit}") as $field) {
			$fields[] = new Resources\ListField($this, $field);
		}
		return $fields;
	}
801610
public function getList(int $page, int $limit, Context $context, array $requestFilters, array $sort): array
    {
        --$page;
        $metaData = $this->getSetMetaData($context);

        $isoList = $this->createIsoList($metaData);
        $languageFiles = $this->getSnippetFilesByIso($isoList);

        $fileSnippets = $this->getFileSnippets($languageFiles, $isoList);
        $dbSnippets = $this->databaseSnippetsToArray($this->findSnippetInDatabase(new Criteria(), $context), $fileSnippets);

        $snippets = array_replace_recursive($fileSnippets, $dbSnippets);
        $snippets = $this->fillBlankSnippets($snippets, $isoList);

        foreach ($requestFilters as $requestFilterName => $requestFilterValue) {
            $snippets = $this->snippetFilterFactory->getFilter($requestFilterName)->filter($snippets, $requestFilterValue);
        }

        $snippets = $this->sortSnippets($sort, $snippets);

        $total = 0;
        foreach ($snippets as $setId => &$set) {
            $total = $total > 0 ? $total : count($set['snippets']);
            $set['snippets'] = array_chunk($set['snippets'], $limit, true)[$page] ?? [];
        }

        return [
            'total' => $total,
            'data' => $this->mergeSnippetsComparison($snippets),
        ];
    }
1268599
public function getItems($offset, $limit)
    {
        $this->cursor->skip($offset);
        $this->cursor->limit($limit);

        return iterator_to_array($this->cursor);
    }
1319842
public function loadAllLocations(int $offset = 0, int $limit = 25): array
    {
        return $this->service->loadAllLocations($offset, $limit);
    }
778195
public function friends($sort = 'onlineStatus', $offset = 0, $limit = 36) : array
    {
        $result = [];

        $friends = $this->get(sprintf(self::USERS_ENDPOINT . 'friends/profiles2', $this->onlineIdParameter()), [
            'fields' => 'onlineId,accountId,avatarUrls,plus,trophySummary(@default),isOfficiallyVerified,personalDetail(@default,profilePictureUrls),presences(@titleInfo,hasBroadcastData,lastOnlineDate),presences(@titleInfo),friendRelation,consoleAvailability',
            'offset' => $offset,
            'limit' => $limit,
            'profilePictureSizes' => 'm',
            'avatarSizes' => 'm',
            'titleIconSize' => 's',
            'sort' => $sort
        ]);
        
        foreach ($friends->profiles as $friend) {
            $result[] = new self($this->client, $friend);
        }

        return $result;
    }
550873
public function load(int $offset = 0, int $limit = 25): self
    {
        $this->data = array_map(
            function (Location $location) {
                return $this->valueFactory->createBookmark($location);
            },
            $this->bookmarkService->loadBookmarks($offset, $limit)->items
        );

        return $this;
    }
1221905
public function read($offset = null, $limit = 10)
    {
        if ($offset === null) {
            $offset = (((int) (($this->getLastRowId() - 1) / $limit)) * $limit) + 1;
        }

        $sql = 'SELECT * FROM ' . $this->table
            . ' WHERE id >= ?'
            . ' ORDER BY id ASC'
            . ' LIMIT ?';

        $events = [];

        $stmt = $this->connection->prepare($sql);
        $stmt->bindValue(1, $offset, Type::INTEGER);
        $stmt->bindValue(2, $limit, Type::INTEGER);
        $stmt->execute();

        while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
            $events[$row['id']] = $this->fromArray($row);
        }

        return $events;
    }
307404
public function loadAllGroups($offset = 0, $limit = -1)
    {
        $data = $this->objectStateGateway->loadObjectStateGroupListData($offset, $limit);

        return $this->objectStateMapper->createObjectStateGroupListFromData($data);
    }
316247
public function formatLimitOffset($limit, $offset = 0) {
        if ($limit && $offset) {
            return sprintf($this->getClause(self::LIMIT_OFFSET), (int) $limit, (int) $offset);
        }

        return $this->formatLimit($limit);
    }