identifier; } public function setIdentifier(string $identifier): self { $this->identifier = $identifier; $this->identifierAliases[] = $identifier; return $this; } /** * @return string[] */ public function getIdentifierAliases(): array { return $this->identifierAliases; } public function addIdentifierAlias(string $alias): self { $this->identifierAliases[] = $alias; return $this; } public function getDeprecateTo(): ?IIdentifier { return $this->deprecateTo; } public function deprecateTo(IIdentifier $destinationObject): self { $this->deprecateTo = $destinationObject; return $this; } public function jsonSerializeIdentifier(): array { $data = [ 'identifier' => $this->identifier, 'identifierAliases' => $this->identifierAliases, ]; if ($this->deprecateTo) { $data['deprecateTo'] = $this->deprecateTo->getIdentifier(); } return $data; } }