| @@ 396-402 (lines=7) @@ | ||
| 393 | . bson_encode($o) . (isset($p['fields']) ? bson_encode($p['fields']) : ''), |
|
| 394 | true, |
|
| 395 | null, |
|
| 396 | function ($conn, $reqId = null) use ($p, $cb) { |
|
| 397 | if (!$conn) { |
|
| 398 | !$cb || $cb(['$err' => 'Connection error.']); |
|
| 399 | return; |
|
| 400 | } |
|
| 401 | $conn->requests[$reqId] = [$p['col'], $cb, true]; |
|
| 402 | } |
|
| 403 | ); |
|
| 404 | } catch (\MongoException $e) { |
|
| 405 | Daemon::log('MongoClient exception: ' . $e->getMessage() . ': ' . $e->getTraceAsString()); |
|
| @@ 477-483 (lines=7) @@ | ||
| 474 | . bson_encode($query) . (isset($p['fields']) ? bson_encode($p['fields']) : ''), |
|
| 475 | true, |
|
| 476 | null, |
|
| 477 | function ($conn, $reqId = null) use ($p, $cb) { |
|
| 478 | if (!$conn) { |
|
| 479 | !$cb || $cb(['$err' => 'Connection error.']); |
|
| 480 | return; |
|
| 481 | } |
|
| 482 | $conn->requests[$reqId] = [$p['col'], $cb, true]; |
|
| 483 | } |
|
| 484 | ); |
|
| 485 | } catch (\MongoException $e) { |
|
| 486 | Daemon::log('MongoClient exception: ' . $e->getMessage() . ': ' . $e->getTraceAsString()); |
|
| @@ 526-532 (lines=7) @@ | ||
| 523 | . bson_encode($query) . (isset($p['fields']) ? bson_encode($p['fields']) : ''), |
|
| 524 | true, |
|
| 525 | null, |
|
| 526 | function ($conn, $reqId = null) use ($p, $cb) { |
|
| 527 | if (!$conn) { |
|
| 528 | !$cb || $cb(['$err' => 'Connection error.']); |
|
| 529 | return; |
|
| 530 | } |
|
| 531 | $conn->requests[$reqId] = [$p['dbname'], $cb, true]; |
|
| 532 | } |
|
| 533 | ); |
|
| 534 | } catch (\MongoException $e) { |
|
| 535 | Daemon::log('MongoClient exception: ' . $e->getMessage() . ': ' . $e->getTraceAsString()); |
|
| @@ 571-577 (lines=7) @@ | ||
| 568 | . (isset($p['fields']) ? bson_encode($p['fields']) : ''), |
|
| 569 | true, |
|
| 570 | null, |
|
| 571 | function ($conn, $reqId = null) use ($p, $cb) { |
|
| 572 | if (!$conn) { |
|
| 573 | !$cb || $cb(['$err' => 'Connection error.']); |
|
| 574 | return; |
|
| 575 | } |
|
| 576 | $conn->requests[$reqId] = [$p['dbname'], $cb, true]; |
|
| 577 | } |
|
| 578 | ); |
|
| 579 | } catch (\MongoException $e) { |
|
| 580 | Daemon::log('MongoClient exception: ' . $e->getMessage() . ': ' . $e->getTraceAsString()); |
|
| @@ 663-669 (lines=7) @@ | ||
| 660 | . pack('VV', 0, -1) . bson_encode($params), |
|
| 661 | true, |
|
| 662 | $conn, |
|
| 663 | function ($conn, $reqId = null) use ($db, $cb) { |
|
| 664 | if (!$conn) { |
|
| 665 | !$cb || $cb(['$err' => 'Connection error.']); |
|
| 666 | return; |
|
| 667 | } |
|
| 668 | $conn->requests[$reqId] = [$db, $cb, true]; |
|
| 669 | } |
|
| 670 | ); |
|
| 671 | } catch (\MongoException $e) { |
|
| 672 | Daemon::log('MongoClient exception: ' . $e->getMessage() . ': ' . $e->getTraceAsString()); |
|
| @@ 748-754 (lines=7) @@ | ||
| 745 | . (isset($p['fields']) ? bson_encode($p['fields']) : ''), |
|
| 746 | true, |
|
| 747 | null, |
|
| 748 | function ($conn, $reqId = null) use ($p, $cb) { |
|
| 749 | if (!$conn) { |
|
| 750 | !$cb || $cb(['$err' => 'Connection error.']); |
|
| 751 | return; |
|
| 752 | } |
|
| 753 | $conn->requests[$reqId] = [$p['col'], $cb, true]; |
|
| 754 | } |
|
| 755 | ); |
|
| 756 | } catch (\MongoException $e) { |
|
| 757 | Daemon::log('MongoClient exception: ' . $e->getMessage() . ': ' . $e->getTraceAsString()); |
|
| @@ 804-810 (lines=7) @@ | ||
| 801 | . (isset($p['fields']) ? bson_encode($p['fields']) : ''), |
|
| 802 | true, |
|
| 803 | null, |
|
| 804 | function ($conn, $reqId = null) use ($p, $cb) { |
|
| 805 | if (!$conn) { |
|
| 806 | !$cb || $cb(['$err' => 'Connection error.']); |
|
| 807 | return; |
|
| 808 | } |
|
| 809 | $conn->requests[$reqId] = [$p['db'], $cb, true]; |
|
| 810 | } |
|
| 811 | ); |
|
| 812 | } catch (\MongoException $e) { |
|
| 813 | Daemon::log('MongoClient exception: ' . $e->getMessage() . ': ' . $e->getTraceAsString()); |
|
| @@ 860-866 (lines=7) @@ | ||
| 857 | . (isset($p['fields']) ? bson_encode($p['fields']) : ''), |
|
| 858 | true, |
|
| 859 | null, |
|
| 860 | function ($conn, $reqId = null) use ($p, $cb) { |
|
| 861 | if (!$conn) { |
|
| 862 | !$cb || $cb(['$err' => 'Connection error.']); |
|
| 863 | return; |
|
| 864 | } |
|
| 865 | $conn->requests[$reqId] = [$p['col'], $cb, true]; |
|
| 866 | } |
|
| 867 | ); |
|
| 868 | } |
|
| 869 | ||
| @@ 994-1000 (lines=7) @@ | ||
| 991 | . (isset($p['fields']) ? bson_encode($p['fields']) : ''), |
|
| 992 | true, |
|
| 993 | null, |
|
| 994 | function ($conn, $reqId = null) use ($p, $cb) { |
|
| 995 | if (!$conn) { |
|
| 996 | !$cb || $cb(['$err' => 'Connection error.']); |
|
| 997 | return; |
|
| 998 | } |
|
| 999 | $conn->requests[$reqId] = [$p['col'], $cb, true]; |
|
| 1000 | } |
|
| 1001 | ); |
|
| 1002 | } catch (\MongoException $e) { |
|
| 1003 | Daemon::log('MongoClient exception: ' . $e->getMessage() . ': ' . $e->getTraceAsString()); |
|
| @@ 1070-1076 (lines=7) @@ | ||
| 1067 | . (isset($p['fields']) ? bson_encode($p['fields']) : ''), |
|
| 1068 | true, |
|
| 1069 | null, |
|
| 1070 | function ($conn, $reqId = null) use ($p, $cb) { |
|
| 1071 | if (!$conn) { |
|
| 1072 | !$cb || $cb(['$err' => 'Connection error.']); |
|
| 1073 | return; |
|
| 1074 | } |
|
| 1075 | $conn->requests[$reqId] = [$p['col'], $cb, false]; |
|
| 1076 | } |
|
| 1077 | ); |
|
| 1078 | } catch (\MongoException $e) { |
|
| 1079 | Daemon::log('MongoClient exception: ' . $e->getMessage() . ': ' . $e->getTraceAsString()); |
|
| @@ 1123-1129 (lines=7) @@ | ||
| 1120 | . bson_encode($query) . (isset($p['fields']) ? bson_encode($p['fields']) : ''), |
|
| 1121 | true, |
|
| 1122 | null, |
|
| 1123 | function ($conn, $reqId = null) use ($p, $cb) { |
|
| 1124 | if (!$conn) { |
|
| 1125 | !$cb || $cb(['$err' => 'Connection error.']); |
|
| 1126 | return; |
|
| 1127 | } |
|
| 1128 | $conn->requests[$reqId] = [$p['col'], $cb, false]; |
|
| 1129 | } |
|
| 1130 | ); |
|
| 1131 | } catch (\MongoException $e) { |
|
| 1132 | Daemon::log('MongoClient exception: ' . $e->getMessage() . ': ' . $e->getTraceAsString()); |
|
| @@ 1595-1601 (lines=7) @@ | ||
| 1592 | pack('V', 0) . $dbname . '.$cmd' . "\x00" . pack('VV', 0, -1) . bson_encode($query), |
|
| 1593 | true, |
|
| 1594 | $conn, |
|
| 1595 | function ($conn, $reqId = null) use ($dbname, $cb) { |
|
| 1596 | if (!$conn) { |
|
| 1597 | !$cb || $cb(['$err' => 'Connection error.']); |
|
| 1598 | return; |
|
| 1599 | } |
|
| 1600 | $conn->requests[$reqId] = [$dbname, $cb, true]; |
|
| 1601 | } |
|
| 1602 | ); |
|
| 1603 | } catch (\MongoException $e) { |
|
| 1604 | Daemon::log('MongoClient exception: ' . $e->getMessage() . ': ' . $e->getTraceAsString()); |
|