Doctrine\ODM\PHPCR\UnitOfWork::validateChildClass PHP Method

validateChildClass() private method

If the parent node has child restrictions, ensure that the given class name is within them.
private validateChildClass ( PHPCR\NodeInterface $parentNode, ClassMetadata $class )
$parentNode PHPCR\NodeInterface
$class Doctrine\ODM\PHPCR\Mapping\ClassMetadata
    private function validateChildClass(NodeInterface $parentNode, ClassMetadata $class)
    {
        $parentClass = $this->documentClassMapper->getClassName($this->dm, $parentNode);
        if (null === $parentClass) {
            return;
        }
        $metadata = $this->dm->getClassMetadata($parentClass);
        $metadata->assertValidChildClass($class);
    }
UnitOfWork