Advertisement
Guest User

Untitled

a guest
Feb 12th, 2021
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. final class NewsRead implements RpcMethod
  2. {
  3. #[Rpc\Pc(method: 'news.read')]
  4. public function __invoke(
  5. NewsReadRequest $request,
  6. #[Rpc\Entity(idPath: 'id')] Feed $feed,
  7. ): void {
  8. $feed->read();
  9. }
  10. }
  11.  
  12. /**
  13. * @psalm-immutable
  14. *
  15. * @psalm-suppress MissingConstructor
  16. */
  17. final class NewsReadRequest implements RpcMethodRequest
  18. {
  19. /**
  20. * @var string
  21. *
  22. * @Assert\NotBlank
  23. * @IsNewsFeedId
  24. */
  25. public $id;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement