| @@ 1110-1118 (lines=9) @@ | ||
| 1107 | . pack('V', $flags) |
|
| 1108 | . bson_encode($cond) |
|
| 1109 | . bson_encode($data) |
|
| 1110 | , false, null, function ($conn, $reqId = null) use ($cb, $col, $params) { |
|
| 1111 | if (!$conn) { |
|
| 1112 | !$cb || call_user_func($cb, ['$err' => 'Connection error.']); |
|
| 1113 | return; |
|
| 1114 | } |
|
| 1115 | if ($cb !== NULL) { |
|
| 1116 | $this->lastError($col, $cb, $params, $conn); |
|
| 1117 | } |
|
| 1118 | }); |
|
| 1119 | } |
|
| 1120 | ||
| 1121 | /** |
|
| @@ 1320-1328 (lines=9) @@ | ||
| 1317 | . $col . "\x00" |
|
| 1318 | . "\x00\x00\x00\x00" |
|
| 1319 | . bson_encode($cond) |
|
| 1320 | , false, null, function ($conn, $reqId = null) use ($col, $cb, $params) { |
|
| 1321 | if (!$conn) { |
|
| 1322 | !$cb || call_user_func($cb, ['$err' => 'Connection error.']); |
|
| 1323 | return; |
|
| 1324 | } |
|
| 1325 | if ($cb !== NULL) { |
|
| 1326 | $this->lastError($col, $cb, $params, $conn); |
|
| 1327 | } |
|
| 1328 | }); |
|
| 1329 | } catch (\MongoException $e) { |
|
| 1330 | Daemon::log('MongoClient exception: '.$e->getMessage().': '.$e->getTraceAsString()); |
|
| 1331 | if ($cb !== null) { |
|