You are here

class MongoDummy in MongoDB 6

Class MongoDummy is a mock class usable as a database or collection.

It accepts any method and ignores it.

Hierarchy

Expanded class hierarchy of MongoDummy

File

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

View source
class MongoDummy {
  public $connection;

  /**
   * Pretend to select a collection.
   *
   * @return \MongoDummy
   *   A fake collection object.
   */
  public function selectCollection() {
    return new MongoDummy();
  }

  /**
   * Accepts any arguments and ignores them.
   *
   * @param string $name
   *   The name of the method being called on the instance.
   * @param mixed[] $arguments
   *   The arguments passed to the method.
   */
  public function __call($name, array $arguments) {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MongoDummy::$connection public property
MongoDummy::selectCollection public function Pretend to select a collection.
MongoDummy::__call public function Accepts any arguments and ignores them.