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;
    }