The name of this database
public __toString ( ) : string | ||
return | string | Returns this database's name. |
/** * @param Client $client * @param \MongoDB|string $database */ public function __construct(Client $client, $database) { $this->client = $client; if ($database instanceof \MongoDB) { $this->database = $database; $this->databaseName = $database->__toString(); } else { $this->databaseName = $database; } }
/** * Wrapper method for MongoDB::__toString(). * * @see http://www.php.net/manual/en/mongodb.--tostring.php * @return string */ public function __toString() { return $this->mongoDB->__toString(); }