Conditions | 2 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
22 | public function setConnection($host = 'localhost', $port = '27017') |
||
23 | { |
||
24 | try { |
||
25 | $client = new \MongoClient("mongodb://$host:$port"); |
||
26 | $this->mongoDB = new \MongoDB($client, 'uber_translations'); |
||
27 | |||
28 | return true; |
||
29 | } catch (\Exception $exception) { |
||
30 | return false; |
||
31 | } |
||
32 | } |
||
33 | |||
98 |