本文整理汇总了PHP中PHPCR\NodeInterface::isSame方法的典型用法代码示例。如果您正苦于以下问题:PHP NodeInterface::isSame方法的具体用法?PHP NodeInterface::isSame怎么用?PHP NodeInterface::isSame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPCR\NodeInterface
的用法示例。
在下文中一共展示了NodeInterface::isSame方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetAncestor
public function testGetAncestor()
{
$ancestor = $this->deepnode->getAncestor(0);
$this->assertNotNull($ancestor);
$this->assertTrue($this->rootNode->isSame($ancestor), 'depth 0 wrong');
$ancestor = $this->deepnode->getAncestor(1);
$this->assertNotNull($ancestor);
$this->assertTrue($this->node->isSame($ancestor), 'depth 1 wrong');
$ancestor = $this->deepnode->getAncestor(2);
$this->assertNotNull($ancestor);
$this->assertTrue($this->node->getNode('multiValueProperty')->isSame($ancestor), 'depth 2 wrong');
//self
$ancestor = $this->deepnode->getAncestor($this->deepnode->getDepth());
$this->assertNotNull($ancestor);
$this->assertTrue($this->deepnode->isSame($ancestor));
}
示例2: isSame
/**
* {@inheritdoc}
*/
public function isSame(ItemInterface $otherItem)
{
return $this->node->isSame($otherItem);
}