You are here

protected function PagedRouteCollection::loadNextElements in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony-cmf/routing/PagedRouteCollection.php \Symfony\Cmf\Component\Routing\PagedRouteCollection::loadNextElements()

Loads the next routes into the elements array.

Parameters

int $offset The offset used in the db query.:

2 calls to PagedRouteCollection::loadNextElements()
PagedRouteCollection::next in vendor/symfony-cmf/routing/PagedRouteCollection.php
PagedRouteCollection::rewind in vendor/symfony-cmf/routing/PagedRouteCollection.php

File

vendor/symfony-cmf/routing/PagedRouteCollection.php, line 60

Class

PagedRouteCollection
Provides a route collection which avoids having all routes in memory.

Namespace

Symfony\Cmf\Component\Routing

Code

protected function loadNextElements($offset) {

  // If the last batch was smaller than the batch size, this means there
  // are no more routes available.
  if (isset($this->currentRoutes) && count($this->currentRoutes) < $this->routesBatchSize) {
    $this->currentRoutes = array();
  }
  else {
    $this->currentRoutes = $this->provider
      ->getRoutesPaged($offset, $this->routesBatchSize);
  }
}