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