MongoCommandCursor.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /*
  3. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  4. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  5. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  6. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  7. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  8. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  9. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  10. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  11. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  12. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  13. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. */
  15. class MongoCommandCursor implements MongoCursorInterface, Iterator{
  16. /**
  17. * Return the current element
  18. * @link http://php.net/manual/en/iterator.current.php
  19. * @return mixed Can return any type.
  20. * @since 5.0.0
  21. */
  22. public function current(){}
  23. /**
  24. * Move forward to next element
  25. * @link http://php.net/manual/en/iterator.next.php
  26. * @return void Any returned value is ignored.
  27. * @since 5.0.0
  28. */
  29. public function next(){}
  30. /**
  31. * Return the key of the current element
  32. * @link http://php.net/manual/en/iterator.key.php
  33. * @return mixed scalar on success, or null on failure.
  34. * @since 5.0.0
  35. */
  36. public function key(){}
  37. /**
  38. * Checks if current position is valid
  39. * @link http://php.net/manual/en/iterator.valid.php
  40. * @return boolean The return value will be casted to boolean and then evaluated.
  41. * Returns true on success or false on failure.
  42. * @since 5.0.0
  43. */
  44. public function valid(){}
  45. /**
  46. * Rewind the Iterator to the first element
  47. * @link http://php.net/manual/en/iterator.rewind.php
  48. * @return void Any returned value is ignored.
  49. * @since 5.0.0
  50. */
  51. public function rewind(){}
  52. function batchSize(int $batchSize):MongoCursorInterface{}
  53. function dead():bool{}
  54. function info():array{}
  55. function getReadPreference():array{}
  56. function setReadPreference(string $read_preference, array $tags = null):MongoCursorInterface{}
  57. function timeout(int $ms):MongoCursorInterface{}
  58. }