lib/Doctrine/ODM/MongoDB/Mapping/Driver/XmlDriver.php 1 location
|
@@ 204-210 (lines=7) @@
|
201 |
|
|
202 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
203 |
|
{ |
204 |
|
if (isset($mapping['name'])) { |
205 |
|
$name = $mapping['name']; |
206 |
|
} elseif (isset($mapping['fieldName'])) { |
207 |
|
$name = $mapping['fieldName']; |
208 |
|
} else { |
209 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
210 |
|
} |
211 |
|
|
212 |
|
$class->mapField($mapping); |
213 |
|
|
lib/Doctrine/ODM/MongoDB/Mapping/Driver/YamlDriver.php 1 location
|
@@ 166-172 (lines=7) @@
|
163 |
|
|
164 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
165 |
|
{ |
166 |
|
if (isset($mapping['name'])) { |
167 |
|
$name = $mapping['name']; |
168 |
|
} elseif (isset($mapping['fieldName'])) { |
169 |
|
$name = $mapping['fieldName']; |
170 |
|
} else { |
171 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
172 |
|
} |
173 |
|
|
174 |
|
$class->mapField($mapping); |
175 |
|
|