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