protoc-gen-twirp_php

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2019 License: MIT Imports: 12 Imported by: 0

README

Twirp PHP generator

Installation

go get -u github.com/99designs/protoc-gen-twirp_php

You will also need:

Generating PHP

The twirp Haberdasher example can be found in example/:

cd example
protoc --twirp_php_out . --php_out . haberdasher.proto

Using the client

The generated client uses Guzzle v6 for making requests.

A dependency is not ideal, but the PHP standard library is lacking in this department.


$client = new GuzzleHttp\Client([
    'base_uri' => $myHost . '/twirp/' // supports soon to be released twirp v6
]);

$haberdasher = new Twirp\Example\Haberdasher\HaberdasherClient($client);
$haberdasher->makeHat(...)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL