diff options
author | Stanley Cheung <stanleycheung@google.com> | 2015-08-27 14:38:38 -0700 |
---|---|---|
committer | Stanley Cheung <stanleycheung@google.com> | 2015-08-27 14:38:38 -0700 |
commit | 0a268216c2c8e112351b7ed038da04bf50b9eb5a (patch) | |
tree | ab93176dac0836e46df5f2b6f54c5a4fba66c823 /examples/php | |
parent | 20fa6693f3836bf1418176ec78b26feaf51a369d (diff) |
replace all grpc-common occurances with examples
Diffstat (limited to 'examples/php')
-rw-r--r-- | examples/php/README.md | 10 | ||||
-rw-r--r-- | examples/php/route_guide/README.md | 16 |
2 files changed, 13 insertions, 13 deletions
diff --git a/examples/php/README.md b/examples/php/README.md index 247235adfd..5c327f10fa 100644 --- a/examples/php/README.md +++ b/examples/php/README.md @@ -18,13 +18,13 @@ INSTALL - Clone this repository ```sh - $ git clone https://github.com/grpc/grpc-common.git + $ git clone https://github.com/grpc/grpc.git ``` - Install composer ``` - $ cd grpc-common/php + $ cd examples/php $ curl -sS https://getcomposer.org/installer | php $ php composer.phar install ``` @@ -36,14 +36,14 @@ TRY IT! Please follow the instruction in [Node][] to run the server ``` - $ cd grpc-common/node + $ cd examples/node $ nodejs greeter_server.js ``` - Run the client ``` - $ cd grpc-common/php + $ cd examples/php $ ./run_greeter_client.sh ``` @@ -61,4 +61,4 @@ Coming soon [homebrew]:http://brew.sh [linuxbrew]:https://github.com/Homebrew/linuxbrew#installation [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install -[Node]:https://github.com/grpc/grpc-common/tree/master/node +[Node]:https://github.com/grpc/grpc/tree/master/examples/node diff --git a/examples/php/route_guide/README.md b/examples/php/route_guide/README.md index 084661a5eb..e5230ae4e4 100644 --- a/examples/php/route_guide/README.md +++ b/examples/php/route_guide/README.md @@ -8,7 +8,7 @@ This tutorial provides a basic PHP programmer's introduction to working with gRP It assumes a passing familiarity with [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). Note that the example in this tutorial uses the proto2 version of the protocol buffers language. -Also note that currently you can only create clients in PHP for gRPC services - you can find out how to create gRPC servers in our other tutorials, e.g. [Node.js](https://github.com/grpc/grpc-common/tree/master/node/route_guide). +Also note that currently you can only create clients in PHP for gRPC services - you can find out how to create gRPC servers in our other tutorials, e.g. [Node.js](examples/node/route_guide). This isn't a comprehensive guide to using gRPC in PHP: more reference documentation is coming soon. @@ -29,14 +29,14 @@ With gRPC you can define your service once in a .proto file and implement client <a name="setup"></a> ## Example code and setup -The example code for our tutorial is in [grpc/grpc-common/php/route_guide](https://github.com/grpc/grpc-common/tree/master/php/route_guide). To download the example, clone the `grpc-common` repository by running the following command: +The example code for our tutorial is in [examples/php/route_guide](examples/php/route_guide). To download the example, clone this repository by running the following command: ```shell -$ git clone https://github.com/grpc/grpc-common.git +$ git clone https://github.com/grpc/grpc.git ``` -Then change your current directory to `grpc-common/php/route_guide`: +Then change your current directory to `examples/php/route_guide`: ```shell -$ cd grpc-common/php/route_guide +$ cd examples/php/route_guide ``` Our example is a simple route mapping application that lets clients get information about features on their route, create a summary of their route, and exchange route information such as traffic updates with the server and other clients. @@ -68,7 +68,7 @@ The next sections guide you step-by-step through how this proto service is defin <a name="proto"></a> ## Defining the service -First let's look at how the service we're using is defined. A gRPC *service* and its method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file for our example in [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto). +First let's look at how the service we're using is defined. A gRPC *service* and its method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file for our example in [`examples/protos/route_guide.proto`](examples/protos/route_guide.proto). To define a service, you specify a named `service` in your .proto file: @@ -128,7 +128,7 @@ message Point { The PHP client stub implementation of the proto files can be generated by the [`protoc-gen-php`](https://github.com/datto/protobuf-php) tool. To install the tool: ```sh -$ cd grpc-common/php +$ cd examples/php $ php composer.phar install $ cd vendor/datto/protobuf-php $ gem install rake ronn @@ -159,7 +159,7 @@ The file contains: <a name="client"></a> ## Creating the client -In this section, we'll look at creating a PHP client for our `RouteGuide` service. You can see our complete example client code in [grpc-common/php/route_guide/route_guide_client.php](https://github.com/grpc/grpc-common/blob/master/php/route_guide/route_guide_client.php). +In this section, we'll look at creating a PHP client for our `RouteGuide` service. You can see our complete example client code in [examples/php/route_guide/route_guide_client.php](examples/php/route_guide/route_guide_client.php). ### Constructing a client object |