lib/Doctrine/ODM/MongoDB/Mapping/Driver/XmlDriver.php 1 location
|
@@ 207-213 (lines=7) @@
|
204 |
|
|
205 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
206 |
|
{ |
207 |
|
if (isset($mapping['name'])) { |
208 |
|
$name = $mapping['name']; |
209 |
|
} elseif (isset($mapping['fieldName'])) { |
210 |
|
$name = $mapping['fieldName']; |
211 |
|
} else { |
212 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
213 |
|
} |
214 |
|
|
215 |
|
$class->mapField($mapping); |
216 |
|
|
lib/Doctrine/ODM/MongoDB/Mapping/Driver/YamlDriver.php 1 location
|
@@ 175-181 (lines=7) @@
|
172 |
|
|
173 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
174 |
|
{ |
175 |
|
if (isset($mapping['name'])) { |
176 |
|
$name = $mapping['name']; |
177 |
|
} elseif (isset($mapping['fieldName'])) { |
178 |
|
$name = $mapping['fieldName']; |
179 |
|
} else { |
180 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
181 |
|
} |
182 |
|
|
183 |
|
$class->mapField($mapping); |
184 |
|
|