1: <?php
2:
3: namespace PHPixie\ORM\Drivers\Driver;
4:
5: class Mongo extends \PHPixie\ORM\Drivers\Driver
6: {
7: public function config($modelName, $configSlice)
8: {
9: return new Mongo\Config(
10: $this->configs->inflector(),
11: $modelName,
12: $configSlice
13: );
14: }
15:
16: public function repository($config)
17: {
18: return new Mongo\Repository(
19: $this->models->database(),
20: $this->database,
21: $this->data,
22: $config
23: );
24: }
25:
26: public function query($config)
27: {
28: return new Mongo\Query(
29: $this->values,
30: $this->mappers->query(),
31: $this->maps->queryProperty(),
32: $this->conditions->container($config->model),
33: $config
34: );
35: }
36:
37: public function entity($repository, $data, $isNew)
38: {
39: return new Mongo\Entity(
40: $this->maps->entityProperty(),
41: $repository,
42: $data,
43: $isNew
44: );
45: }
46: }
47: