![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/dceprojects.corals.io/vendor/nesk/rialto/src/Data/ |
<?php namespace Nesk\Rialto\Data; class ResourceIdentity implements \JsonSerializable { /** * The class name of the resource. * * @var string */ protected $className; /** * The unique identifier of the resource. * * @var string */ protected $uniqueIdentifier; /** * Constructor. */ public function __construct(string $className, string $uniqueIdentifier) { $this->className = $className; $this->uniqueIdentifier = $uniqueIdentifier; } /** * Return the class name of the resource. */ public function className(): string { return $this->className; } /** * Return the unique identifier of the resource. */ public function uniqueIdentifier(): string { return $this->uniqueIdentifier; } /** * Serialize the object to a value that can be serialized natively by {@see json_encode}. */ public function jsonSerialize(): array { return [ '__rialto_resource__' => true, 'class_name' => $this->className(), 'id' => $this->uniqueIdentifier(), ]; } }