59 $this->currentAttributes = $node->getValueNames(
false);
60 $this->currentAttribute =
current($this->currentAttributes);
69 $node = $this->nodeIterator->current();
70 return $node->getValue($this->currentAttribute);
77 public function key() {
85 $next =
next($this->currentAttributes);
86 if ($next !==
false) {
87 $this->currentAttribute = $next;
90 if ($this->recursive) {
91 $this->nodeIterator->next();
92 if (!$this->nodeIterator->valid()) {
96 $nextNode = $this->nodeIterator->current();
97 $this->currentAttributes = $nextNode->getValueNames(
false);
98 $this->currentAttribute =
current($this->currentAttributes);
112 $this->nodeIterator->rewind();
113 $this->currentAttributes = $this->nodeIterator->current()->getValueNames(
false);
114 $this->currentAttribute =
current($this->currentAttributes);
130 return $this->nodeIterator->current();
NodeValueIterator is used to iterate over all persistent values of a Node (not including relations).
valid()
Checks if current position is valid.
key()
Return the key of the current element.
NodeIterator is used to iterate over a tree/list built of Nodes using a Depth-First-Algorithm.
__construct($node, $recursive)
Constructor.
rewind()
Rewind the Iterator to the first element.
current()
Return the current element.
Node adds the concept of relations to PersistentObject.
next()
Move forward to next element.
Node related interfaces and classes.
currentNode()
Get the current node.