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