name = $name; $this->identifier = $identifier; } public function getName(): string { return $this->name; } public function getIdentifier(): string { return $this->identifier; } /** * @return static */ public function withUid(string $identifier): self { if ($this->identifier === $identifier) { return $this; } $target = clone $this; $target->identifier = $identifier; return $target; } public function isNode(): bool { return $this->name === 'pages'; } public function isEqualTo(EntityPointer $other): bool { return $this->identifier === $other->getIdentifier() && $this->name === $other->getName(); } }