lib/Doctrine/ODM/MongoDB/Mapping/Driver/YamlDriver.php 1 location
|
@@ 159-165 (lines=7) @@
|
156 |
|
|
157 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
158 |
|
{ |
159 |
|
if (isset($mapping['name'])) { |
160 |
|
$name = $mapping['name']; |
161 |
|
} elseif (isset($mapping['fieldName'])) { |
162 |
|
$name = $mapping['fieldName']; |
163 |
|
} else { |
164 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
165 |
|
} |
166 |
|
|
167 |
|
$class->mapField($mapping); |
168 |
|
|
lib/Doctrine/ODM/MongoDB/Mapping/Driver/XmlDriver.php 1 location
|
@@ 198-204 (lines=7) @@
|
195 |
|
|
196 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
197 |
|
{ |
198 |
|
if (isset($mapping['name'])) { |
199 |
|
$name = $mapping['name']; |
200 |
|
} elseif (isset($mapping['fieldName'])) { |
201 |
|
$name = $mapping['fieldName']; |
202 |
|
} else { |
203 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
204 |
|
} |
205 |
|
|
206 |
|
$class->mapField($mapping); |
207 |
|
|