You are here

class MongoDebugCursor in MongoDB 6

Same name and namespace in other branches
  1. 7 mongodb.module \MongoDebugCursor

Class MongoDebugCursor wraps a cursor with debug() instructions.

Hierarchy

Expanded class hierarchy of MongoDebugCursor

File

./mongodb.module, line 156
A library of common mechanisms for modules using MongoDB.

View source
class MongoDebugCursor {

  /**
   * The cursor wrapped by this instance.
   *
   * @var \MongoCursor
   */
  protected $cursor;

  /**
   * Constructor.
   *
   * @param MongoCursor $cursor
   *   The cursor to wrap.
   */
  public function __construct(MongoCursor $cursor) {
    $this->cursor = $cursor;
  }

  /**
   * {@inheritdoc}
   */
  public function __call($name, $arguments) {
    debug($name);
    debug($arguments);
    return call_user_func_array(array(
      $this->cursor,
      $name,
    ), $arguments);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MongoDebugCursor::$cursor protected property The cursor wrapped by this instance.
MongoDebugCursor::__call public function
MongoDebugCursor::__construct public function Constructor.