Lines Matching +full:comparator +full:< +full:> +(+path:plugin +path:struct) -(+path:plugin +path:struct +path:lang)
1 <?php
38 $this->value = $value;
39 $this->parentPath = $parentPath;
40 $this->depth = $depth;
48 return $this->depth;
56 $this->depth = $depth;
57 foreach ($this->children as $child) {
58 $child->setDepth($depth + 1);
69 return $this->value;
82 $this->children[(string)$child] = $child; // ensures uniqueness
93 $children = $this->children;
117 $ident = md5(array_reduce($row, static fn($carry, $value) => $carry . $value, ''));
119 $this->resultRows[$ident] = $row;
129 return array_values($this->resultRows);
139 if (!$this->value instanceof Value) return ''; // root node
140 return $this->parentPath . '/' . $this->value->__toString();
144 * Custom comparator to sort the children of this node
152 $compA = implode('-', (array)$a->getValueObject()->getCompareValue());
153 $compB = implode('-', (array)$b->getValueObject()->getCompareValue());
184 if ($this->value) {
185 $val = implode(', ', (array)$this->value->getDisplayValue());
187 $return .= str_pad('', $this->getDepth() * 4, ' ');
194 foreach ($this->getResultRows() as $row) {
195 $return .= str_pad('', $this->getDepth() * 4, ' ');
197 $val = implode(', ', (array)$value->getDisplayValue());
204 foreach ($this->getChildren($sort) as $child) {
205 $return .= $child->dump();