EMongoPagination.php 496 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * EMongoPagination
  4. * @author Kim BeeJay <kim@beejay.ru>
  5. * corresponding to CPagination for MongoYii
  6. * @see yii/framework/web/CPagination
  7. */
  8. class EMongoPagination extends CPagination
  9. {
  10. /**
  11. * Applies LIMIT and SKIP to the specified query criteria.
  12. *
  13. * @param EMongoCriteria $criteria the query criteria that should be applied with the limit
  14. */
  15. public function applyLimit($criteria)
  16. {
  17. $criteria->limit = $this->getLimit();
  18. $criteria->skip = $this->getOffset();
  19. }
  20. }