MongoDBRef
class MongoDBRef (View source)
Properties
static protected string | $refKey | ||
static protected string | $idKey |
Methods
static array
create(string $collection, mixed $id, string $database = null)
If no database is given, the current database is used.
static bool
isRef(mixed $ref)
This not actually follow the reference, so it does not determine if it is broken or not.
Details
static array
create(string $collection, mixed $id, string $database = null)
If no database is given, the current database is used.
static bool
isRef(mixed $ref)
This not actually follow the reference, so it does not determine if it is broken or not.
It merely checks that $ref is in valid database reference format (in that it is an object or array with $ref and $id fields).
static array|null
get(MongoDB $db, array $ref)
Fetches the object pointed to by a reference