src/Pagerfanta/AuraSqlPager.php
public function offsetGet($currentPage)
    {
        if (! $this->routeGenerator instanceof RouteGeneratorInterface) {
            throw new NotInitialized();
        }
        $pagerfanta = new Pagerfanta(new ExtendedPdoAdapter($this->pdo, $this->sql, $this->params));
        $pagerfanta->setMaxPerPage($this->paging);
        $pagerfanta->setCurrentPage($currentPage);
        $page = new Page($pagerfanta, $this->routeGenerator, $this->view, $this->viewOptions);
        $page->maxPerPage = $pagerfanta->getMaxPerPage();
        $page->current = $pagerfanta->getCurrentPage();
        $page->hasNext = $pagerfanta->hasNextPage();
        $page->hasPrevious = $pagerfanta->hasPreviousPage();
        $page->data = $pagerfanta->getCurrentPageResults();
        $page->total = $pagerfanta->getNbResults();

        return $page;
    }
public function offsetGet($currentPage)
    {
        if (! $this->routeGenerator instanceof RouteGeneratorInterface) {
            throw new NotInitialized();
        }
        $pagerfanta = new Pagerfanta(new ExtendedPdoAdapter($this->pdo, $this->sql, $this->params));
        $pagerfanta->setMaxPerPage($this->paging);
        $pagerfanta->setCurrentPage($currentPage);
        $page = new Page($pagerfanta, $this->routeGenerator, $this->view, $this->viewOptions);
        $page->maxPerPage = $pagerfanta->getMaxPerPage();
        $page->current = $pagerfanta->getCurrentPage();
        $page->hasNext = $pagerfanta->hasNextPage();
        $page->hasPrevious = $pagerfanta->hasPreviousPage();
        $page->data = $pagerfanta->getCurrentPageResults();
        $page->total = $pagerfanta->getNbResults();

        return $page;
    }
public function offsetGet ( $ currentPage ) { if ( ! $ this -> routeGenerator instanceof RouteGeneratorInterface ) { throw new NotInitialized ( ) ; } $ pagerfanta = new Pagerfanta ( new ExtendedPdoAdapter ( $ this -> pdo , $ this -> sql , $ this -> params ) ) ; $ pagerfanta -> setMaxPerPage ( $ this -> paging ) ; $ pagerfanta -> setCurrentPage ( $ currentPage ) ; $ page = new Page ( $ pagerfanta , $ this -> routeGenerator , $ this -> view , $ this -> viewOptions ) ; $ page -> maxPerPage = $ pagerfanta -> getMaxPerPage ( ) ; $ page -> current = $ pagerfanta -> getCurrentPage ( ) ; $ page -> hasNext = $ pagerfanta -> hasNextPage ( ) ; $ page -> hasPrevious = $ pagerfanta -> hasPreviousPage ( ) ; $ page -> data = $ pagerfanta -> getCurrentPageResults ( ) ; $ page -> total = $ pagerfanta -> getNbResults ( ) ; return $ page ; }
{@inheritdoc}
{