public function paginate($select, $resultSet = null)
    {
        $resultSet = $resultSet ?: $this->getResultSet();
        $adapter = new DbSelect($select, $this->getAdapter(), $resultSet);
        $paginator = new Paginator($adapter);

        $options = $this->getPaginatorOptions();

        if (isset($options['limit'])) {
            $paginator->setItemCountPerPage($options['limit']);
        }

        if (isset($options['page'])) {
            $paginator->setCurrentPageNumber($options['page']);
        }

        $paginator->setPageRange(5);

        return $paginator;
    }
public function paginate($select, $resultSet = null)
    {
        $resultSet = $resultSet ?: $this->getResultSet();
        $adapter = new DbSelect($select, $this->getAdapter(), $resultSet);
        $paginator = new Paginator($adapter);

        $options = $this->getPaginatorOptions();

        if (isset($options['limit'])) {
            $paginator->setItemCountPerPage($options['limit']);
        }

        if (isset($options['page'])) {
            $paginator->setCurrentPageNumber($options['page']);
        }

        $paginator->setPageRange(5);

        return $paginator;
    }
public function paginate ( $ select , $ resultSet = null ) { $ resultSet = $ resultSet ? : $ this -> getResultSet ( ) ; $ adapter = new DbSelect ( $ select , $ this -> getAdapter ( ) , $ resultSet ) ; $ paginator = new Paginator ( $ adapter ) ; $ options = $ this -> getPaginatorOptions ( ) ; if ( isset ( $ options [ 'limit' ] ) ) { $ paginator -> setItemCountPerPage ( $ options [ 'limit' ] ) ; } if ( isset ( $ options [ 'page' ] ) ) { $ paginator -> setCurrentPageNumber ( $ options [ 'page' ] ) ; } $ paginator -> setPageRange ( 5 ) ; return $ paginator ; }
Paginates the result set

@param Select $select
@param AbstractResultSet $resultSet
@return Paginator
Paginates the result set