Permalink
Browse files

wrapping Morph_Query::limit() and Morph_Query::skip() in Morph_Query_…

…Property to a more fluid interface.

git-svn-id: http://mongodb-morph.googlecode.com/svn/trunk@129 406649b4-5d4b-11de-8abc-d1c337b90d21
  • Loading branch information...
XirisR XirisR
XirisR authored and XirisR committed Feb 15, 2010
1 parent 67446cb commit 1d5e00cd476253de07030215e7a8ccc250b31790
Showing with 22 additions and 0 deletions.
  1. +22 −0 mongodb-morph/src/Morph/Query/Property.php
@@ -76,6 +76,28 @@ public function property($propertyName)
return $this->query->property($propertyName);
}
+ /**
+ * Sets the limit for the result set
+ *
+ * @param int $limit
+ * @return Morph_Query
+ */
+ public function limit($limit)
+ {
+ return $this->query->limit($limit);
+ }
+
+ /**
+ * Skips the first $numberToSkip results that would normally be returned
+ *
+ * @param int $numberToSkip
+ * @return Morph_Query
+ */
+ public function skip($numberToSkip)
+ {
+ return $this->query->skip($numberToSkip);
+ }
+
//////////////////////////
// CONSTRAINT FUNCTIONS //
//////////////////////////

0 comments on commit 1d5e00c

Please sign in to comment.