summaryrefslogtreecommitdiff
path: root/tests/plugins/grpc/php_server/src/EchoService.php
blob: c2707811a00cdb8b127c09388964eb77af48fdaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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()));
    }
}