You are here

class MongoDebugCursor in MongoDB 7

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

Hierarchy

Expanded class hierarchy of MongoDebugCursor

File

./mongodb.module, line 206
Contains the main module connecting Drupal to MongoDB.

View source
class MongoDebugCursor {

  /**
   * Constructor.
   *
   * @param string $collection
   *   The name of the collection on which the cursor applies.
   *
   * @see mongoDebugCollection::find()
   */
  public function __construct($collection) {
    $this->collection = $collection;
  }

  /**
   * Decorates the standard __call() by debug()-ing its arguments.
   *
   * @param string $name
   *   The name of the called method.
   * @param array $arguments
   *   The arguments for the decorated __call().
   *
   * @return mixed
   *   The result of the decorated __call().
   */
  public function __call($name, array $arguments) {
    debug($name);
    debug($arguments);
    return call_user_func_array(array(
      $this->collection,
      $name,
    ), $arguments);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MongoDebugCursor::__call public function Decorates the standard __call() by debug()-ing its arguments.
MongoDebugCursor::__construct public function Constructor.