![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/phpgt/dom/src/ |
<?php namespace Gt\Dom; /** * Contains methods that are particular to Node objects that can have a parent, * but not suitable for DocumentType. * * This trait can only be used in a class that is a trait of LiveProperty. * * This trait is used by the following classes: * - Element * - CharacterData * @property-read Element|null $previousElementSibling The Element immediately * prior to this Node in its parent's $children list, or null if there is no * Element in the list prior to this Node. * @property-read Element|null $nextElementSibling The Element immediately * following this Node in its parent's children list, or null if there is no * Element in the list following this node. */ trait NonDocumentTypeChildNode { protected function prop_get_previousElementSibling() { $element = $this; while($element) { $element = $element->previousSibling; if($element instanceof Element) { return $element; } } return null; } protected function prop_get_nextElementSibling() { $element = $this; while($element) { $element = $element->nextSibling; if($element instanceof Element) { return $element; } } return null; } }