Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final class NewsRead implements RpcMethod
- {
- #[Rpc\Pc(method: 'news.read')]
- public function __invoke(
- NewsReadRequest $request,
- #[Rpc\Entity(idPath: 'id')] Feed $feed,
- ): void {
- $feed->read();
- }
- }
- /**
- * @psalm-immutable
- *
- * @psalm-suppress MissingConstructor
- */
- final class NewsReadRequest implements RpcMethodRequest
- {
- /**
- * @var string
- *
- * @Assert\NotBlank
- * @IsNewsFeedId
- */
- public $id;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement