setIsLeaf() public method

Set if this document should act as a leaf node.
public setIsLeaf ( boolean $isLeaf )
$isLeaf boolean
Ejemplo n.º 1
0
 /**
  * It should throw an exception if given a child class FQN when the
  * metadata is for a leaf.
  *
  * @expectedException \Doctrine\ODM\PHPCR\Exception\OutOfBoundsException
  * @expectedExceptionMessage has been mapped as a leaf
  */
 public function testAssertValidChildClassesIsLeaf()
 {
     $cm = new ClassMetadata('Doctrine\\Tests\\ODM\\PHPCR\\Mapping\\Person');
     $childCm = new ClassMetadata('stdClass');
     $cm->setIsLeaf(true);
     $cm->assertValidChildClass($childCm);
 }