protected function initPaginator($select)
    {
        $this->usePaginator = false;

        $this->paginator = new Paginator(
                    $select,
                    $this->tableGateway->getAdapter(),
                    $this->tableGateway->getResultSetPrototype());

        if (isset($this->paginatorOptions['n'])) {
            $this->paginator->setN($this->paginatorOptions['n']);
        }
        if (isset($this->paginatorOptions['p'])) {
            $this->paginator->setP($this->paginatorOptions['p']);
        }
        if (isset($this->paginatorOptions['c'])) {
            $this->paginator->setC($this->paginatorOptions['c']);
        }
        if (isset($this->paginatorOptions['s'])) {
            $this->paginator->setS($this->paginatorOptions['s']);
        }
        if (isset($this->paginatorOptions['d'])) {
            $this->paginator->setD($this->paginatorOptions['d']);
        }
        if (isset($this->paginatorOptions['o'])) {
            $this->paginator->setO($this->paginatorOptions['o']);
        }

        return $this->paginator->getItems();
    }
protected function initPaginator($select)
    {
        $this->usePaginator = false;

        $this->paginator = new Paginator(
                    $select,
                    $this->tableGateway->getAdapter(),
                    $this->tableGateway->getResultSetPrototype());

        if (isset($this->paginatorOptions['n'])) {
            $this->paginator->setN($this->paginatorOptions['n']);
        }
        if (isset($this->paginatorOptions['p'])) {
            $this->paginator->setP($this->paginatorOptions['p']);
        }
        if (isset($this->paginatorOptions['c'])) {
            $this->paginator->setC($this->paginatorOptions['c']);
        }
        if (isset($this->paginatorOptions['s'])) {
            $this->paginator->setS($this->paginatorOptions['s']);
        }
        if (isset($this->paginatorOptions['d'])) {
            $this->paginator->setD($this->paginatorOptions['d']);
        }
        if (isset($this->paginatorOptions['o'])) {
            $this->paginator->setO($this->paginatorOptions['o']);
        }

        return $this->paginator->getItems();
    }
protected function initPaginator ( $ select ) { $ this -> usePaginator = false ; $ this -> paginator = new Paginator ( $ select , $ this -> tableGateway -> getAdapter ( ) , $ this -> tableGateway -> getResultSetPrototype ( ) ) ; if ( isset ( $ this -> paginatorOptions [ 'n' ] ) ) { $ this -> paginator -> setN ( $ this -> paginatorOptions [ 'n' ] ) ; } if ( isset ( $ this -> paginatorOptions [ 'p' ] ) ) { $ this -> paginator -> setP ( $ this -> paginatorOptions [ 'p' ] ) ; } if ( isset ( $ this -> paginatorOptions [ 'c' ] ) ) { $ this -> paginator -> setC ( $ this -> paginatorOptions [ 'c' ] ) ; } if ( isset ( $ this -> paginatorOptions [ 's' ] ) ) { $ this -> paginator -> setS ( $ this -> paginatorOptions [ 's' ] ) ; } if ( isset ( $ this -> paginatorOptions [ 'd' ] ) ) { $ this -> paginator -> setD ( $ this -> paginatorOptions [ 'd' ] ) ; } if ( isset ( $ this -> paginatorOptions [ 'o' ] ) ) { $ this -> paginator -> setO ( $ this -> paginatorOptions [ 'o' ] ) ; } return $ this -> paginator -> getItems ( ) ; }
Init the paginator with a select object.

@param \Zend\Db\Sql\Select|array $select

@return mixed
Init the paginator with a select object .