1: <?php
2:
3: namespace PHPixie\ORM\Drivers\Driver\Mongo;
4:
5: class Config extends \PHPixie\ORM\Models\Type\Database\Config
6: {
7: public $collection;
8:
9: protected function processConfig($configSlice, $inflector)
10: {
11: if (($this->collection = $configSlice->get('collection', null)) === null) {
12: $this->collection = $inflector->plural($this->model);
13: }
14:
15: parent::processConfig($configSlice, $inflector);
16: }
17:
18: protected function driver()
19: {
20: return 'mongo';
21: }
22:
23: protected function idField($configSlice)
24: {
25: return $configSlice->get('id', '_id');
26: }
27: }
28: