11<?php namespace Jenssegers \Mongodb ;
22
3+ use Illuminate \Database \Connection as BaseConnection ;
34use MongoDB \Client ;
45
5- class Connection extends \ Illuminate \ Database \Connection
6+ class Connection extends BaseConnection
67{
78 /**
89 * The MongoDB database handler.
@@ -44,14 +45,6 @@ public function __construct(array $config)
4445 $ this ->useDefaultSchemaGrammar ();
4546 }
4647
47- /**
48- * @inheritdoc
49- */
50- protected function getDefaultPostProcessor ()
51- {
52- return new Query \Processor ;
53- }
54-
5548 /**
5649 * Begin a fluent query against a database collection.
5750 *
@@ -60,9 +53,7 @@ protected function getDefaultPostProcessor()
6053 */
6154 public function collection ($ collection )
6255 {
63- $ processor = $ this ->getPostProcessor ();
64-
65- $ query = new Query \Builder ($ this , $ processor );
56+ $ query = new Query \Builder ($ this , $ this ->getPostProcessor ());
6657
6758 return $ query ->from ($ collection );
6859 }
@@ -198,12 +189,28 @@ public function getDriverName()
198189 return 'mongodb ' ;
199190 }
200191
192+ /**
193+ * @inheritdoc
194+ */
195+ protected function getDefaultPostProcessor ()
196+ {
197+ return new Query \Processor ();
198+ }
199+
200+ /**
201+ * @inheritdoc
202+ */
203+ protected function getDefaultQueryGrammar ()
204+ {
205+ return new Query \Grammar ();
206+ }
207+
201208 /**
202209 * @inheritdoc
203210 */
204211 protected function getDefaultSchemaGrammar ()
205212 {
206- return new Schema \Grammar ;
213+ return new Schema \Grammar () ;
207214 }
208215
209216 /**
0 commit comments