Содержимое всей корзины.

@param int $limit
@param int $offset

@return \Arhitector\Yandex\Disk\Resource\Collection
199866
public function getTrashResources($limit = 20, $offset = 0)
	{
		return (new Disk\Resource\Collection(function($parameters) {
			if ( ! empty($parameters['sort'])
				&& ! in_array($parameters['sort'], ['deleted', 'created', '-deleted', '-created'])
			)
			{
				throw new \UnexpectedValueException('Допустимые значения сортировки - deleted, created и со знаком "минус".');
			}

			$response = $this->send((new Request($this->uri->withPath($this->uri->getPath().'trash/resources')
				->withQuery(http_build_query($parameters + ['path' => 'trash:/'], null, '&')), 'GET')));

			if ($response->getStatusCode() == 200)
			{
				$response = json_decode($response->getBody(), true);

				if (isset($response['_embedded']['items']))
				{
					return array_map(function($item) {
						return new Disk\Resource\Removed($item, $this, $this->uri);
					}, $response['_embedded']['items']);
				}
			}

			return [];
		}))
			->setSort('created')
			->setLimit($limit, $offset);
	}
1075189
public function fetchAll($limit = null, $offset = null){
		$limit = $limit === null ? -1 : (int) $limit;
		if($offset !== null)
			$this->seek((int) $offset);

		$row = $this->fetch();
		if(!$row)
			return array();

		$rows = array();
		do{
			if($limit === 0)
				break;
			$rows[] = $row;
			$limit--;
		} while($row = $this->fetch());

		return $rows;
	}
88542
final public function limit($limit, $offset = 0)
    {
        $this->_sql['limit'] = $limit;
        $this->offset($offset);
        return $this;
    }
1012141
public function getList($limit, $offset = 0)
    {
        return $this->getEntityManager()->createQuery('
            SELECT
                n
            FROM
                AnimeDbAppBundle:Notice n
            ORDER BY
                n.date_created DESC
        ')
            ->setFirstResult($offset)
            ->setMaxResults($limit)
            ->getResult();
    }
115568
public function loadAllLocations($offset, $limit)
    {
        $this->logger->logCall(__METHOD__, array('offset' => $offset, 'limit' => $limit));

        return $this->persistenceHandler->locationHandler()->loadAllLocations($offset, $limit);
    }
743935
public function limit($offset, $limit)
	{
		$this->data = $this->data_source->limit($limit, $offset)->fetchAll();

		return $this;
	}
746056
public function page($limit, $offset)
    {
        $this->limit = $limit;
        $this->offset = $offset;
        return $this;
    }
401917
public function limit($limit, $offset = null)
    {
        $self              = self::getInstance();
        $offset            = (!empty($offset)) ? 'OFFSET '.$offset : null;
        $self->optionLimit = " LIMIT {$limit} ".$offset;

        return $self;
    }
788384
public function limit($limit, $offset = null)
    {
        $this->queryBuilder->setLimit($limit, $offset);
        return $this;
    }
773071
public function findRelevantEvents($offset, $limit)
    {
        $query = $this->prepareRelevantEventsQuery();

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

        return $query->execute();
    }
1107907
protected function queryLimitOffset($query, $limit = null, $offset = 0)
    {
        $limit  = $limit ?: $this->limit;
        $offset = $offset ?: $this->offset;

        if ($limit) {
            $query->take($limit)->skip($offset);
        }

        return $query;
    }
1160793
public function setLimits($offset, $limit, $max = 0, $cutoff = 0)
    {
        assert(is_int($offset));
        assert(is_int($limit));
        assert(is_int($max));
        assert(is_int($cutoff));
        assert($offset >= 0);
        assert($limit > 0);
        assert($max >= 0);
        assert($cutoff >= 0);

        $this->_offset = $offset;
        $this->_limit = $limit;
        if ($max > 0) {
            $this->_maxmatches = $max;
        }
        if ($cutoff > 0) {
            $this->_cutoff = $cutoff;
        }

        return $this;
    }
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;
    }
195693
public function setPagination($offset, $limit)
    {
        $this->pagination['offset'] = (Integer) $offset;
        $this->pagination['limit'] = (Integer) $limit;
        return $this;
    }
1327499
public function findAllPaginated($offset = null, $limit = null)
    {
        $qb = $this
            ->createQueryBuilder('w')
            ->orderBy('w.id')
            ->setMaxResults($limit);
        if ($offset) {
            $qb->setFirstResult($offset);
        }

        return $qb->getQuery()->getResult();
    }
926470
public function limit($limit, $offset = '')
    {
        if (is_null($limit)) {
            throw new \Exception('Empty parameter given to limit clause ');
        }

        if (empty($offset) && !empty($limit)) {
            $this->limitValue = 0;
            $this->offsetValue = intval($limit);
        } else {
            $this->limitValue = intval($limit);
            $this->offsetValue = intval($offset);
        }

        return $this;
    }
634867
public function getItems($offset, $limit)
    {
        $query = $this->search->getQuery();
        $query->setFrom($offset);
        $query->setSize($limit);

        return $this->search->search()->getResults();
    }