1 | <?php |
||
21 | class MongoDBEntityStore extends EntityStore { |
||
22 | |||
23 | /** |
||
24 | * Option to set the time limit for query operations in milliseconds. |
||
25 | */ |
||
26 | const OPTION_QUERY_TIME_LIMIT = 'mongodb-query-time-limit'; |
||
27 | |||
28 | /** |
||
29 | * @var Database |
||
30 | */ |
||
31 | private $database; |
||
32 | |||
33 | /** |
||
34 | * @var DispatchingEntityLookup |
||
35 | */ |
||
36 | private $entityLookup; |
||
37 | |||
38 | /** |
||
39 | * @var DispatchingEntityIdForTermLookup |
||
40 | */ |
||
41 | private $entityForTermLookup; |
||
42 | |||
43 | /** |
||
44 | * @var DispatchingEntityIdForQueryLookup |
||
45 | */ |
||
46 | private $entityForQueryLookup; |
||
47 | |||
48 | /** |
||
49 | * @var EntityDocumentSaver |
||
50 | */ |
||
51 | private $entitySaver; |
||
52 | |||
53 | /** |
||
54 | * @param Database $database |
||
55 | * @param EntityStoreOptions $options |
||
56 | */ |
||
57 | 10 | public function __construct( Database $database, EntityStoreOptions $options = null ) { |
|
69 | |||
70 | 10 | private function newEntityDatabase( Database $database ) { |
|
73 | |||
74 | 10 | private function newEntityIdForTermLookup( Database $database ) { |
|
77 | |||
78 | 10 | private function newEntityIdForQueryLookup( Database $database ) { |
|
85 | |||
86 | 10 | private function newDocumentBuilder() { |
|
95 | |||
96 | /** |
||
97 | * @see EntityStore::getEntityLookup |
||
98 | */ |
||
99 | 1 | public function getEntityLookup() { |
|
102 | |||
103 | /** |
||
104 | * @see EntityStore::getEntityDocumentLookup |
||
105 | */ |
||
106 | 2 | public function getEntityDocumentLookup() { |
|
109 | |||
110 | /** |
||
111 | * @see EntityStore::getItemLookup |
||
112 | */ |
||
113 | 2 | public function getItemLookup() { |
|
116 | |||
117 | /** |
||
118 | * @see EntityStore::getPropertyLookup |
||
119 | */ |
||
120 | 2 | public function getPropertyLookup() { |
|
123 | |||
124 | /** |
||
125 | * @see EntityStore::getEntityDocumentSaver |
||
126 | */ |
||
127 | 2 | public function getEntityDocumentSaver() { |
|
130 | |||
131 | /** |
||
132 | * @see EntityStore::getItemIdForTermLookup |
||
133 | */ |
||
134 | 2 | public function getItemIdForTermLookup() { |
|
137 | |||
138 | /** |
||
139 | * @see EntityStore::getPropertyIdForTermLookup |
||
140 | */ |
||
141 | 2 | public function getPropertyIdForTermLookup() { |
|
144 | |||
145 | /** |
||
146 | * @see EntityStore::getItemIdForQueryLookup |
||
147 | */ |
||
148 | 2 | public function getItemIdForQueryLookup() { |
|
151 | |||
152 | /** |
||
153 | * @see EntityStore::getPropertyIdForQueryLookup |
||
154 | */ |
||
155 | 2 | public function getPropertyIdForQueryLookup() { |
|
158 | |||
159 | /** |
||
160 | * @see EntityStore::setupStore |
||
161 | */ |
||
162 | 1 | public function setupStore() { |
|
170 | |||
171 | /** |
||
172 | * @see EntityStore::setupIndexes |
||
173 | */ |
||
174 | 1 | public function setupIndexes() { |
|
178 | |||
179 | 1 | private function setupTermIndexes() { |
|
197 | |||
198 | 1 | private function setupClaimsIndexes() { |
|
211 | } |
||
212 |