Doctrine\ODM\PHPCR\Mapping\Driver\AnnotationDriver::getCascadeMode PHP Method

getCascadeMode() private method

Gathers a list of cascade options found in the given cascade element.
private getCascadeMode ( array $cascadeList ) : integer
$cascadeList array
return integer a bitmask of cascade options.
    private function getCascadeMode(array $cascadeList)
    {
        $cascade = 0;
        foreach ($cascadeList as $cascadeMode) {
            $constantName = 'Doctrine\\ODM\\PHPCR\\Mapping\\ClassMetadata::CASCADE_' . strtoupper($cascadeMode);
            if (!defined($constantName)) {
                throw new MappingException("Cascade mode '{$cascadeMode}' not supported.");
            }
            $cascade |= constant($constantName);
        }
        return $cascade;
    }