Grpc\BaseStub::_simpleRequest PHP Method

_simpleRequest() public method

Call a remote method that takes a single argument and has a single output.
public _simpleRequest ( string $method, mixed $argument, callable $deserialize, array $metadata = [], $options = [] ) : grpc\SimpleSurfaceActiveCall
$method string The name of the method to call
$argument mixed The argument to the method
$deserialize callable A function that deserializes the response
$metadata array A metadata map to send to the server
return grpc\SimpleSurfaceActiveCall The active call object
    public function _simpleRequest($method, $argument, $deserialize, $metadata = [], $options = [])
    {
        $call = new UnaryCall($this->channel, $method, $deserialize, $options);
        $jwt_aud_uri = $this->_get_jwt_aud_uri($method);
        if (is_callable($this->update_metadata)) {
            $metadata = call_user_func($this->update_metadata, $metadata, $jwt_aud_uri);
        }
        $metadata = $this->_validate_and_normalize_metadata($metadata);
        $call->start($argument, $metadata, $options);
        return $call;
    }