MongoGridFSCursor.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 MongoGridFSCursor extends MongoCursor implements Traversable, Iterator {
  16. /**
  17. * @static
  18. * @var $slaveOkay
  19. */
  20. public static $slaveOkay;
  21. /**
  22. * @link http://php.net/manual/en/class.mongogridfscursor.php#mongogridfscursor.props.gridfs
  23. * @var $gridfs
  24. */
  25. protected $gridfs;
  26. /**
  27. * Create a new cursor
  28. * @link http://php.net/manual/en/mongogridfscursor.construct.php
  29. * @param MongoGridFS $gridfs Related GridFS collection
  30. * @param resource $connection Database connection
  31. * @param string $ns Full name of database and collection
  32. * @param array $query Database query
  33. * @param array $fields Fields to return
  34. * @return MongoGridFSCursor Returns the new cursor
  35. */
  36. public function __construct($gridfs, $connection, $ns, $query, $fields) {}
  37. /**
  38. * Return the next file to which this cursor points, and advance the cursor
  39. * @link http://php.net/manual/en/mongogridfscursor.getnext.php
  40. * @return MongoGridFSFile Returns the next file
  41. */
  42. public function getNext() {}
  43. /**
  44. * Returns the current file
  45. * @link http://php.net/manual/en/mongogridfscursor.current.php
  46. * @return MongoGridFSFile The current file
  47. */
  48. public function current() {}
  49. /**
  50. * Returns the current result's filename
  51. * @link http://php.net/manual/en/mongogridfscursor.key.php
  52. * @return string The current results filename
  53. */
  54. public function key() {}
  55. }