aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/php/route_guide/route_guide.php
diff options
context:
space:
mode:
Diffstat (limited to 'examples/php/route_guide/route_guide.php')
-rw-r--r--examples/php/route_guide/route_guide.php142
1 files changed, 70 insertions, 72 deletions
diff --git a/examples/php/route_guide/route_guide.php b/examples/php/route_guide/route_guide.php
index a836e03b55..76086f9772 100644
--- a/examples/php/route_guide/route_guide.php
+++ b/examples/php/route_guide/route_guide.php
@@ -1,9 +1,9 @@
<?php
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
// Source: route_guide.proto
-// Date: 2015-06-12 00:32:41
+// Date: 2015-08-31 21:11:45
-namespace examples {
+namespace routeguide {
class Point extends \DrSlump\Protobuf\Message {
@@ -19,7 +19,7 @@ namespace examples {
public static function descriptor()
{
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.Point');
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'routeguide.Point');
// OPTIONAL INT32 latitude = 1
$f = new \DrSlump\Protobuf\Field();
@@ -58,7 +58,7 @@ namespace examples {
/**
* Clear <latitude> value
*
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function clearLatitude(){
return $this->_clear(1);
@@ -77,7 +77,7 @@ namespace examples {
* Set <latitude> value
*
* @param int $value
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function setLatitude( $value){
return $this->_set(1, $value);
@@ -95,7 +95,7 @@ namespace examples {
/**
* Clear <longitude> value
*
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function clearLongitude(){
return $this->_clear(2);
@@ -114,7 +114,7 @@ namespace examples {
* Set <longitude> value
*
* @param int $value
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function setLongitude( $value){
return $this->_set(2, $value);
@@ -122,14 +122,14 @@ namespace examples {
}
}
-namespace examples {
+namespace routeguide {
class Rectangle extends \DrSlump\Protobuf\Message {
- /** @var \examples\Point */
+ /** @var \routeguide\Point */
public $lo = null;
- /** @var \examples\Point */
+ /** @var \routeguide\Point */
public $hi = null;
@@ -138,7 +138,7 @@ namespace examples {
public static function descriptor()
{
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.Rectangle');
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'routeguide.Rectangle');
// OPTIONAL MESSAGE lo = 1
$f = new \DrSlump\Protobuf\Field();
@@ -146,7 +146,7 @@ namespace examples {
$f->name = "lo";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\examples\Point';
+ $f->reference = '\routeguide\Point';
$descriptor->addField($f);
// OPTIONAL MESSAGE hi = 2
@@ -155,7 +155,7 @@ namespace examples {
$f->name = "hi";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\examples\Point';
+ $f->reference = '\routeguide\Point';
$descriptor->addField($f);
foreach (self::$__extensions as $cb) {
@@ -177,7 +177,7 @@ namespace examples {
/**
* Clear <lo> value
*
- * @return \examples\Rectangle
+ * @return \routeguide\Rectangle
*/
public function clearLo(){
return $this->_clear(1);
@@ -186,7 +186,7 @@ namespace examples {
/**
* Get <lo> value
*
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function getLo(){
return $this->_get(1);
@@ -195,10 +195,10 @@ namespace examples {
/**
* Set <lo> value
*
- * @param \examples\Point $value
- * @return \examples\Rectangle
+ * @param \routeguide\Point $value
+ * @return \routeguide\Rectangle
*/
- public function setLo(\examples\Point $value){
+ public function setLo(\routeguide\Point $value){
return $this->_set(1, $value);
}
@@ -214,7 +214,7 @@ namespace examples {
/**
* Clear <hi> value
*
- * @return \examples\Rectangle
+ * @return \routeguide\Rectangle
*/
public function clearHi(){
return $this->_clear(2);
@@ -223,7 +223,7 @@ namespace examples {
/**
* Get <hi> value
*
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function getHi(){
return $this->_get(2);
@@ -232,23 +232,23 @@ namespace examples {
/**
* Set <hi> value
*
- * @param \examples\Point $value
- * @return \examples\Rectangle
+ * @param \routeguide\Point $value
+ * @return \routeguide\Rectangle
*/
- public function setHi(\examples\Point $value){
+ public function setHi(\routeguide\Point $value){
return $this->_set(2, $value);
}
}
}
-namespace examples {
+namespace routeguide {
class Feature extends \DrSlump\Protobuf\Message {
/** @var string */
public $name = null;
- /** @var \examples\Point */
+ /** @var \routeguide\Point */
public $location = null;
@@ -257,7 +257,7 @@ namespace examples {
public static function descriptor()
{
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.Feature');
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'routeguide.Feature');
// OPTIONAL STRING name = 1
$f = new \DrSlump\Protobuf\Field();
@@ -273,7 +273,7 @@ namespace examples {
$f->name = "location";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\examples\Point';
+ $f->reference = '\routeguide\Point';
$descriptor->addField($f);
foreach (self::$__extensions as $cb) {
@@ -295,7 +295,7 @@ namespace examples {
/**
* Clear <name> value
*
- * @return \examples\Feature
+ * @return \routeguide\Feature
*/
public function clearName(){
return $this->_clear(1);
@@ -314,7 +314,7 @@ namespace examples {
* Set <name> value
*
* @param string $value
- * @return \examples\Feature
+ * @return \routeguide\Feature
*/
public function setName( $value){
return $this->_set(1, $value);
@@ -332,7 +332,7 @@ namespace examples {
/**
* Clear <location> value
*
- * @return \examples\Feature
+ * @return \routeguide\Feature
*/
public function clearLocation(){
return $this->_clear(2);
@@ -341,7 +341,7 @@ namespace examples {
/**
* Get <location> value
*
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function getLocation(){
return $this->_get(2);
@@ -350,20 +350,20 @@ namespace examples {
/**
* Set <location> value
*
- * @param \examples\Point $value
- * @return \examples\Feature
+ * @param \routeguide\Point $value
+ * @return \routeguide\Feature
*/
- public function setLocation(\examples\Point $value){
+ public function setLocation(\routeguide\Point $value){
return $this->_set(2, $value);
}
}
}
-namespace examples {
+namespace routeguide {
class RouteNote extends \DrSlump\Protobuf\Message {
- /** @var \examples\Point */
+ /** @var \routeguide\Point */
public $location = null;
/** @var string */
@@ -375,7 +375,7 @@ namespace examples {
public static function descriptor()
{
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.RouteNote');
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'routeguide.RouteNote');
// OPTIONAL MESSAGE location = 1
$f = new \DrSlump\Protobuf\Field();
@@ -383,7 +383,7 @@ namespace examples {
$f->name = "location";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\examples\Point';
+ $f->reference = '\routeguide\Point';
$descriptor->addField($f);
// OPTIONAL STRING message = 2
@@ -413,7 +413,7 @@ namespace examples {
/**
* Clear <location> value
*
- * @return \examples\RouteNote
+ * @return \routeguide\RouteNote
*/
public function clearLocation(){
return $this->_clear(1);
@@ -422,7 +422,7 @@ namespace examples {
/**
* Get <location> value
*
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function getLocation(){
return $this->_get(1);
@@ -431,10 +431,10 @@ namespace examples {
/**
* Set <location> value
*
- * @param \examples\Point $value
- * @return \examples\RouteNote
+ * @param \routeguide\Point $value
+ * @return \routeguide\RouteNote
*/
- public function setLocation(\examples\Point $value){
+ public function setLocation(\routeguide\Point $value){
return $this->_set(1, $value);
}
@@ -450,7 +450,7 @@ namespace examples {
/**
* Clear <message> value
*
- * @return \examples\RouteNote
+ * @return \routeguide\RouteNote
*/
public function clearMessage(){
return $this->_clear(2);
@@ -469,7 +469,7 @@ namespace examples {
* Set <message> value
*
* @param string $value
- * @return \examples\RouteNote
+ * @return \routeguide\RouteNote
*/
public function setMessage( $value){
return $this->_set(2, $value);
@@ -477,7 +477,7 @@ namespace examples {
}
}
-namespace examples {
+namespace routeguide {
class RouteSummary extends \DrSlump\Protobuf\Message {
@@ -499,7 +499,7 @@ namespace examples {
public static function descriptor()
{
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.RouteSummary');
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'routeguide.RouteSummary');
// OPTIONAL INT32 point_count = 1
$f = new \DrSlump\Protobuf\Field();
@@ -556,7 +556,7 @@ namespace examples {
/**
* Clear <point_count> value
*
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function clearPointCount(){
return $this->_clear(1);
@@ -575,7 +575,7 @@ namespace examples {
* Set <point_count> value
*
* @param int $value
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function setPointCount( $value){
return $this->_set(1, $value);
@@ -593,7 +593,7 @@ namespace examples {
/**
* Clear <feature_count> value
*
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function clearFeatureCount(){
return $this->_clear(2);
@@ -612,7 +612,7 @@ namespace examples {
* Set <feature_count> value
*
* @param int $value
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function setFeatureCount( $value){
return $this->_set(2, $value);
@@ -630,7 +630,7 @@ namespace examples {
/**
* Clear <distance> value
*
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function clearDistance(){
return $this->_clear(3);
@@ -649,7 +649,7 @@ namespace examples {
* Set <distance> value
*
* @param int $value
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function setDistance( $value){
return $this->_set(3, $value);
@@ -667,7 +667,7 @@ namespace examples {
/**
* Clear <elapsed_time> value
*
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function clearElapsedTime(){
return $this->_clear(4);
@@ -686,7 +686,7 @@ namespace examples {
* Set <elapsed_time> value
*
* @param int $value
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function setElapsedTime( $value){
return $this->_set(4, $value);
@@ -694,38 +694,36 @@ namespace examples {
}
}
-namespace examples {
+namespace routeguide {
- class RouteGuideClient{
+ class RouteGuideClient extends \Grpc\BaseStub {
- private $rpc_impl;
-
- public function __construct($rpc_impl) {
- $this->rpc_impl = $rpc_impl;
+ public function __construct($hostname, $opts) {
+ parent::__construct($hostname, $opts);
}
/**
- * @param examples\Point $input
+ * @param routeguide\Point $input
*/
- public function GetFeature(\examples\Point $argument, $metadata = array()) {
- return $this->rpc_impl->_simpleRequest('/examples.RouteGuide/GetFeature', $argument, '\examples\Feature::deserialize', $metadata);
+ public function GetFeature(\routeguide\Point $argument, $metadata = array(), $options = array()) {
+ return $this->_simpleRequest('/routeguide.RouteGuide/GetFeature', $argument, '\routeguide\Feature::deserialize', $metadata, $options);
}
/**
- * @param examples\Rectangle $input
+ * @param routeguide\Rectangle $input
*/
- public function ListFeatures($argument, $metadata = array()) {
- return $this->rpc_impl->_serverStreamRequest('/examples.RouteGuide/ListFeatures', $argument, '\examples\Feature::deserialize', $metadata);
+ public function ListFeatures($argument, $metadata = array(), $options = array()) {
+ return $this->_serverStreamRequest('/routeguide.RouteGuide/ListFeatures', $argument, '\routeguide\Feature::deserialize', $metadata, $options);
}
/**
- * @param examples\Point $input
+ * @param routeguide\Point $input
*/
- public function RecordRoute($arguments, $metadata = array()) {
- return $this->rpc_impl->_clientStreamRequest('/examples.RouteGuide/RecordRoute', $arguments, '\examples\RouteSummary::deserialize', $metadata);
+ public function RecordRoute($metadata = array()) {
+ return $this->_clientStreamRequest('/routeguide.RouteGuide/RecordRoute', '\routeguide\RouteSummary::deserialize', $metadata);
}
/**
- * @param examples\RouteNote $input
+ * @param routeguide\RouteNote $input
*/
public function RouteChat($metadata = array()) {
- return $this->rpc_impl->_bidiRequest('/examples.RouteGuide/RouteChat', '\examples\RouteNote::deserialize', $metadata);
+ return $this->_bidiRequest('/routeguide.RouteGuide/RouteChat', '\routeguide\RouteNote::deserialize', $metadata);
}
}
}