(PECL mongo >= 0.9.0)
MongoDBRef::get — 锟斤拷取锟斤拷锟斤拷锟斤拷指锟斤拷亩锟斤拷锟�
This extension that defines this class is deprecated. Instead, the MongoDB extension should be used. There is no equivalent for this class in the new extension.
锟斤拷锟捷匡拷锟斤拷锟矫o拷database reference锟斤拷 锟侥革拷锟筋,锟斤拷锟揭达拷锟斤拷锟窖撅拷锟斤拷锟斤拷锟矫★拷
db
使锟矫碉拷锟斤拷锟捷库。
ref
要锟斤拷取锟斤拷锟斤拷锟矫★拷
锟斤拷锟斤拷锟斤拷锟斤拷指锟斤拷锟斤拷牡锟斤拷锟斤拷锟斤拷锟侥碉拷锟斤拷锟斤拷锟斤拷锟津返伙拷 NULL
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟金坏o拷锟斤拷
Example #1 MongoCollection::createDBRef() 锟斤拷锟斤拷
<?php
// 锟斤拷 db 锟斤拷取 $person锟斤拷
$person = $people->findOne();
// 锟斤拷锟斤拷锟斤拷锟矫碉拷 address
$address = MongoDBRef::get($people->db, $person['address']);
?>