19declare(strict_types=1);
26class Index implements IndexFilePathNodeInterface
35 $this->indexing_from_end_enabled =
false;
55 $clone->indexing_from_end_enabled = $enabled;
62 if (!isset($this->comparison)) {
63 $indexing = $this->indexing_from_end_enabled
64 ?
'(last)-' . $this->index
67 $indexing =
'position()' . $this->comparison->toString();
69 return '[' . $indexing .
']';
bool $indexing_from_end_enabled
HandlerInterface $comparison
withComparison(HandlerInterface $comparison)
withIndexingFromEndEnabled(bool $enabled)