public function __get($name)
{
// Handle w and wtimeout properties that replicate data stored in $readPreference
if ($name === 'w' || $name === 'wtimeout') {
return $this->getWriteConcern()[$name];
}
return $this->db->selectCollection($this->name . '.' . str_replace(chr(0), '', $name));
}
/** * Wrapper method for MongoCollection::__get(). * * @see http://php.net/manual/en/mongocollection.get.php * @param string $name * @return \MongoCollection */ public function __get($name) { return $this->mongoCollection->__get($name); }