From 3c79729faa41955029d7d3d03e123d6b811a0e68 Mon Sep 17 00:00:00 2001 From: Steve Dwire Date: Tue, 16 Mar 2021 08:26:43 -0400 Subject: [PATCH] Pass Collection insert() parameters by reference --- lib/Phactory/Mongo/Collection.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Phactory/Mongo/Collection.php b/lib/Phactory/Mongo/Collection.php index 3800b42..83efab6 100644 --- a/lib/Phactory/Mongo/Collection.php +++ b/lib/Phactory/Mongo/Collection.php @@ -30,6 +30,11 @@ public function __toString() { return $this->_name; } + public function insert($data, $options) { + $coll = $this->_collection; + return $coll->insert($data,$options); + } + public function __call($func, $args) { return call_user_func_array(array($this->_collection, $func), $args); }