Debian Codegraph @

src/php/lib/Grpc/MethodDescriptor.php

raw
1 <?php
2 /*
3 *
4 * Copyright 2020 gRPC authors.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19
20 namespace Grpc;
21
22 /**
23 * This is an experimental and incomplete implementation of gRPC server
24 * for PHP. APIs are _definitely_ going to be changed.
25 *
26 * DO NOT USE in production.
27 */
28
29 class MethodDescriptor
30 {
31 public function __construct(
32 object $service,
33 string $method_name,
34 string $request_type,
35 int $call_type
36 ) {
37 $this->service = $service;
38 $this->method_name = $method_name;
39 $this->request_type = $request_type;
40 $this->call_type = $call_type;
41 }
42
43 public const UNARY_CALL = 0;
44 public const SERVER_STREAMING_CALL = 1;
45 public const CLIENT_STREAMING_CALL = 2;
46 public const BIDI_STREAMING_CALL = 3;
47
48 public $service;
49 public $method_name;
50 public $request_type;
51 public $call_type;
52 }