summaryrefslogtreecommitdiff
path: root/tests/plugins/grpc/php_server/src/EchoService.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugins/grpc/php_server/src/EchoService.php')
-rw-r--r--tests/plugins/grpc/php_server/src/EchoService.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/plugins/grpc/php_server/src/EchoService.php b/tests/plugins/grpc/php_server/src/EchoService.php
new file mode 100644
index 00000000..c2707811
--- /dev/null
+++ b/tests/plugins/grpc/php_server/src/EchoService.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Sample GRPC PHP server.
+ */
+
+use Spiral\GRPC\ContextInterface;
+use Service\EchoInterface;
+use Service\Message;
+
+class EchoService implements EchoInterface
+{
+ public function Ping(ContextInterface $ctx, Message $in): Message
+ {
+ $out = new Message();
+ return $out->setMsg(strtoupper($in->getMsg()));
+ }
+} \ No newline at end of file