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
|
@@ 164-170 (lines=7) @@
|
| 161 |
|
|
| 162 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
| 163 |
|
{ |
| 164 |
|
if (isset($mapping['name'])) { |
| 165 |
|
$name = $mapping['name']; |
| 166 |
|
} elseif (isset($mapping['fieldName'])) { |
| 167 |
|
$name = $mapping['fieldName']; |
| 168 |
|
} else { |
| 169 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
| 170 |
|
} |
| 171 |
|
|
| 172 |
|
$class->mapField($mapping); |
| 173 |
|
|