MongoDB
PHP Manual

MongoDB::createDBRef

(PECL mongo >=0.9.0)

MongoDB::createDBRefCreates a database reference

Description

public array MongoDB::createDBRef ( string $collection , mixed $a )

This method is a flexible interface for creating database refrences (see MongoDBRef).

Parameters

collection

The collection to which the database reference will point.

a

Object or _id to which to create a reference. If an object or associative array is given, this will create a reference using the _id field.

Return Values

Returns a database reference array.


MongoDB
PHP Manual