BasicResource.php 612 B

12345678910111213141516171819
  1. <?php
  2. namespace Nesk\Rialto\Data;
  3. use Nesk\Rialto\Traits\{IdentifiesResource, CommunicatesWithProcessSupervisor};
  4. use Nesk\Rialto\Interfaces\{ShouldIdentifyResource, ShouldCommunicateWithProcessSupervisor};
  5. class BasicResource implements ShouldIdentifyResource, ShouldCommunicateWithProcessSupervisor, \JsonSerializable
  6. {
  7. use IdentifiesResource, CommunicatesWithProcessSupervisor;
  8. /**
  9. * Serialize the object to a value that can be serialized natively by {@see json_encode}.
  10. */
  11. public function jsonSerialize(): ResourceIdentity
  12. {
  13. return $this->getResourceIdentity();
  14. }
  15. }