lib/Doctrine/ODM/CouchDB/Mapping/Driver/AnnotationDriver.php 1 location
|
@@ 113-124 (lines=12) @@
|
| 110 |
|
* @return integer a bitmask of cascade options. |
| 111 |
|
* @throws MappingException |
| 112 |
|
*/ |
| 113 |
|
private function getCascadeMode(array $cascadeList) |
| 114 |
|
{ |
| 115 |
|
$cascade = 0; |
| 116 |
|
foreach ($cascadeList as $cascadeMode) { |
| 117 |
|
$constantName = 'Doctrine\ODM\CouchDB\Mapping\ClassMetadata::CASCADE_' . strtoupper($cascadeMode); |
| 118 |
|
if (!defined($constantName)) { |
| 119 |
|
throw new MappingException("Cascade mode '$cascadeMode' not supported."); |
| 120 |
|
} |
| 121 |
|
$cascade |= constant($constantName); |
| 122 |
|
} |
| 123 |
|
return $cascade; |
| 124 |
|
} |
| 125 |
|
} |
| 126 |
|
|
lib/Doctrine/ODM/CouchDB/Mapping/Driver/YamlDriver.php 1 location
|
@@ 161-173 (lines=13) @@
|
| 158 |
|
* @return integer a bitmask of cascade options. |
| 159 |
|
* @throws MappingException |
| 160 |
|
*/ |
| 161 |
|
private function getCascadeMode(array $cascadeElement) |
| 162 |
|
{ |
| 163 |
|
$cascade = 0; |
| 164 |
|
foreach ($cascadeElement as $cascadeMode) { |
| 165 |
|
$constantName = 'Doctrine\ODM\CouchDB\Mapping\ClassMetadata::CASCADE_' . strtoupper($cascadeMode); |
| 166 |
|
if (!defined($constantName)) { |
| 167 |
|
throw new MappingException("Cascade mode '$cascadeMode' not supported."); |
| 168 |
|
} |
| 169 |
|
$cascade |= constant($constantName); |
| 170 |
|
} |
| 171 |
|
|
| 172 |
|
return $cascade; |
| 173 |
|
} |
| 174 |
|
} |
| 175 |
|
|