First prototype
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..633bc94
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+config.php
+files
diff --git a/ajax/api.php b/ajax/api.php
new file mode 100644
index 0000000..cdeecc8
--- /dev/null
+++ b/ajax/api.php
@@ -0,0 +1,4 @@
+<?php
+require_once(__DIR__."/../core.php");
+
+api::handleRequest();
diff --git a/api_deprecated.php b/api_deprecated.php
new file mode 100644
index 0000000..e58ca51
--- /dev/null
+++ b/api_deprecated.php
@@ -0,0 +1,75 @@
+<?php
+class api {
+ private function writeJSON($array) {
+ echo json_encode($array);
+ }
+
+ private function error($error = null) {
+ self::writeJSON(["status" => "error", "error" => $error]);
+ exit();
+ }
+
+ private function returnData($data) {
+ self::writeJSON(["status" => "ok", "data" => $data]);
+ exit();
+ }
+
+ public static function handleRequest() {
+ global $_GET, $_POST;
+
+ if (!isset($_GET["action"])) self::error("actionNotProvided");
+
+ switch ($_GET["action"]) {
+ case "linies":
+ $liniesFull = tmbApi::request("transit/linies/metro");
+ if ($liniesFull === false || !isset($liniesFull["features"])) self::error("unexpected");
+
+ $linies = [];
+ foreach ($liniesFull["features"] as $linia) {
+ if (!isset($linia["properties"])) self::error("unexpected");
+ $linies[] = [
+ "id" => $linia["properties"]["ID_LINIA"] ?? null,
+ "nom" => $linia["properties"]["NOM_LINIA"] ?? "",
+ "desc" => $linia["properties"]["DESC_LINIA"] ?? "",
+ "color" => $linia["properties"]["COLOR_LINIA"] ?? "000",
+ "colorText" => $linia["properties"]["COLOR_TEXT_LINIA"] ?? "fff",
+ "ordre" => $linia["properties"]["ORDRE_LINIA"] ?? 0
+ ];
+ }
+
+ usort($linies, function ($a, $b) {
+ return $a["ordre"] - $b["ordre"];
+ });
+
+ self::returnData($linies);
+ break;
+
+ case "estacions":
+ if (!isset($_GET["linia"])) self::error("missingArguments");
+ $linia = (int)$_GET["linia"];
+ $estacionsFull = tmbApi::request("transit/linies/metro/".$linia."/estacions");
+ if ($estacionsFull === false || !isset($estacionsFull["features"])) self::error("unexpected");
+
+ $estacions = [];
+ foreach ($estacionsFull["features"] as $estacio) {
+ if (!isset($estacio["properties"])) self::error("unexpected");
+ $estacions[] = [
+ "id" => $estacio["properties"]["CODI_ESTACIO"] ?? null,
+ "nom" => $estacio["properties"]["NOM_ESTACIO"] ?? "",
+ "color" => $estacio["properties"]["COLOR_LINIA"] ?? "000",
+ "ordre" => $estacio["properties"]["ORDRE_ESTACIO"] ?? 0
+ ];
+ }
+
+ usort($estacions, function ($a, $b) {
+ return $a["ordre"] - $b["ordre"];
+ });
+
+ self::returnData($estacions);
+ break;
+
+ default:
+ self::error("actionNotImplemented");
+ }
+ }
+}
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..c4fad9e
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,5 @@
+{
+ "require": {
+ "google/protobuf": "^3.11"
+ }
+}
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 0000000..ddacdd7
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,59 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "51ea1e0e96ec32af036c55f3fc514e97",
+ "packages": [
+ {
+ "name": "google/protobuf",
+ "version": "v3.11.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/protocolbuffers/protobuf-php.git",
+ "reference": "0864882396746542ead01fc002e1644b9490dbe8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/0864882396746542ead01fc002e1644b9490dbe8",
+ "reference": "0864882396746542ead01fc002e1644b9490dbe8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": ">=4.8.0"
+ },
+ "suggest": {
+ "ext-bcmath": "Need to support JSON deserialization"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Google\\Protobuf\\": "src/Google/Protobuf",
+ "GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "proto library for PHP",
+ "homepage": "https://developers.google.com/protocol-buffers/",
+ "keywords": [
+ "proto"
+ ],
+ "time": "2019-12-14T00:45:36+00:00"
+ }
+ ],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": []
+}
diff --git a/config.default.php b/config.default.php
new file mode 100644
index 0000000..a53ef00
--- /dev/null
+++ b/config.default.php
@@ -0,0 +1,8 @@
+<?php
+$conf = [];
+
+$conf["tmbApi"] = [];
+$conf["tmbApi"]["appId"] = "";
+$conf["tmbApi"]["appKey"] = "";
+
+$conf["databaseFile"] = "";
diff --git a/core.php b/core.php
new file mode 100644
index 0000000..89c2ec0
--- /dev/null
+++ b/core.php
@@ -0,0 +1,16 @@
+<?php
+// Core of the application
+
+require __DIR__.'/vendor/autoload.php';
+
+// Classes autoload
+spl_autoload_register(function($className) {
+ include_once(__DIR__."/inc/".str_replace("\\", DIRECTORY_SEPARATOR, str_replace("..", "", $className)).".php");
+});
+
+// Getting configuration
+require_once(__DIR__."/config.php");
+
+// Setting timezone and locale accordingly
+date_default_timezone_set("Europe/Madrid");
+setlocale(LC_TIME, 'es_ES.UTF-8', 'es_ES', 'es');
diff --git a/cron/parsegtfs.php b/cron/parsegtfs.php
new file mode 100644
index 0000000..6965136
--- /dev/null
+++ b/cron/parsegtfs.php
@@ -0,0 +1,10 @@
+<?php
+require_once(__DIR__."/../core.php");
+
+echo "[info] Getting gtfs.zip file...\n";
+$temp = tmpfile();
+tmbApi::request("static/datasets/gtfs.zip", $temp);
+
+echo "\n";
+
+gtfsHandler::createDatabase(stream_get_meta_data($temp)['uri']);
diff --git a/css/index.css b/css/index.css
new file mode 100644
index 0000000..fe5d9b0
--- /dev/null
+++ b/css/index.css
@@ -0,0 +1,7 @@
+body {
+ font-family: "Roboto", "Helvetica", "Arial", sans-serif;
+}
+
+form label {
+ font-weight: bold;
+}
diff --git a/css/views/l9n.css b/css/views/l9n.css
new file mode 100644
index 0000000..ccfab0c
--- /dev/null
+++ b/css/views/l9n.css
@@ -0,0 +1,93 @@
+@media (orientation: landscape) {
+ :root {
+ --unit-size: 1vh;
+ }
+}
+
+@media (orientation: portrait) {
+ :root {
+ --unit-size: 1vw;
+ }
+}
+
+body {
+ background: black;
+ color: white;
+ font-family: "Arial", sans-serif;
+ font-weight: bold;
+
+ margin: 0;
+}
+
+#container {
+ width: 100%;
+}
+
+body.view-new #trains {
+ max-width: calc(85*var(--unit-size));
+}
+
+body.view-old #trains {
+ width: 100%;
+}
+
+.train {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: nowrap;
+
+ margin: calc(2*var(--unit-size));
+ /*margin-bottom: calc(5*var(--unit-size));*/
+}
+
+body.view-new .train {
+ margin-bottom: calc(8*var(--unit-size));
+}
+
+.train * {
+ align-self: center;
+}
+
+.train .logo {
+ text-align: center;
+}
+
+body.view-old .train .logo {
+ padding: calc(1*var(--unit-size));
+ margin-right: calc(2*var(--unit-size));
+
+ line-height: calc(11.5*var(--unit-size));
+ width: calc(11.5*var(--unit-size));
+ height: calc(11.5*var(--unit-size));
+}
+
+body.view-new .train .logo {
+ padding: calc(0.25*var(--unit-size));
+ margin: calc(1*var(--unit-size)) calc(1.5*var(--unit-size)) calc(1*var(--unit-size)) 0;
+
+ line-height: calc(11*var(--unit-size));
+ width: calc(11*var(--unit-size));
+ height: calc(11*var(--unit-size));
+}
+
+.train .destination {
+ flex-grow: 1;
+}
+
+body.view-old .train .destination {
+ font-size: calc(6.75*var(--unit-size));
+ margin-left: calc(2*var(--unit-size));
+}
+
+body.view-new .train .destination {
+ font-size: calc(5.5*var(--unit-size));
+ margin-bottom: calc(3*var(--unit-size));
+}
+
+.train .time {
+ min-width: calc(19.25*var(--unit-size));
+ margin: 0 calc(2*var(--unit-size));
+
+ font-size: calc(6.5*var(--unit-size));
+ text-align: left;
+}
diff --git a/css/views/l9n_deprecated2.css b/css/views/l9n_deprecated2.css
new file mode 100644
index 0000000..76103da
--- /dev/null
+++ b/css/views/l9n_deprecated2.css
@@ -0,0 +1,81 @@
+body {
+ background: black;
+ color: white;
+ font-family: "Arial", sans-serif;
+ font-weight: bold;
+
+ margin: 0;
+}
+
+#container {
+ width: 100%;
+}
+
+body.view-new #trains {
+ max-width: 680px;
+}
+
+body.view-old #trains {
+ width: 100%;
+}
+
+.train {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: nowrap;
+
+ margin: 16px;
+ /*margin-bottom: 5vh;*/
+}
+
+body.view-new .train {
+ margin-bottom: 64px;
+}
+
+.train * {
+ align-self: center;
+}
+
+.train .logo {
+ text-align: center;
+}
+
+body.view-old .train .logo {
+ padding: 8px;
+ margin-right: 16px;
+
+ line-height: 92px;
+ width: 92px;
+ height: 92px;
+}
+
+body.view-new .train .logo {
+ padding: 2px;
+ margin: 8px 12px 8px 0;
+
+ line-height: 88vh;
+ width: 88vh;
+ height: 88vh;
+}
+
+.train .destination {
+ flex-grow: 1;
+}
+
+body.view-old .train .destination {
+ font-size: 54px;
+ margin-left: 16px;
+}
+
+body.view-new .train .destination {
+ font-size: 44px;
+ margin-bottom: 24px;
+}
+
+.train .time {
+ min-width: 154px;
+ margin: 0 16px;
+
+ font-size: 52px;
+ text-align: left;
+}
diff --git a/img/l9map.jpg b/img/l9map.jpg
new file mode 100644
index 0000000..1cfc9b4
--- /dev/null
+++ b/img/l9map.jpg
Binary files differ
diff --git a/img/train.svg b/img/train.svg
new file mode 100644
index 0000000..b683866
--- /dev/null
+++ b/img/train.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2c-4 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h2.23l2-2H14l2 2h2v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm3.5-7H6V6h5v4zm2 0V6h5v4h-5zm3.5 7c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/><path fill="none" d="M0 0h24v24H0V0z"/></svg>
\ No newline at end of file
diff --git a/inc/GPBMetadata/Proto/Gtfs.php b/inc/GPBMetadata/Proto/Gtfs.php
new file mode 100644
index 0000000..d65da4d
--- /dev/null
+++ b/inc/GPBMetadata/Proto/Gtfs.php
@@ -0,0 +1,178 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace GPBMetadata\Proto;
+
+class Gtfs
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ \GPBMetadata\Google\Protobuf\Any::initOnce();
+ $pool->internalAddGeneratedFile(hex2bin(
+ "0af0230a1070726f746f2f677466732e70726f746f12046774667322510a" .
+ "0b466565644d65737361676512200a0668656164657218012001280b3210" .
+ "2e677466732e4665656448656164657212200a06656e7469747918022003" .
+ "280b32102e677466732e46656564456e7469747922e6010a0a4665656448" .
+ "656164657212140a0c677466735f76657273696f6e180120012809121b0a" .
+ "13666565645f7075626c69736865725f6e616d65180220012809121a0a12" .
+ "666565645f7075626c69736865725f75726c18032001280912110a096665" .
+ "65645f6c616e6718042001280912170a0f666565645f73746172745f6461" .
+ "746518052001280912150a0d666565645f656e645f646174651806200128" .
+ "0912140a0c666565645f76657273696f6e18072001280912280a09657874" .
+ "656e73696f6e18d00f2001280b32142e676f6f676c652e70726f746f6275" .
+ "662e416e794a0608e80710d00f2291040a0a46656564456e74697479120a" .
+ "0a02696418012001280912120a0a69735f64656c65746564180220012808" .
+ "121e0a066167656e637918032001280b320c2e677466732e4167656e6379" .
+ "4800121a0a0473746f7018042001280b320a2e677466732e53746f704800" .
+ "121c0a05726f75746518052001280b320b2e677466732e526f7574654800" .
+ "121a0a047472697018062001280b320a2e677466732e5472697048001223" .
+ "0a0973746f705f74696d6518072001280b320e2e677466732e53746f7054" .
+ "696d65480012220a0863616c656e64617218082001280b320e2e67746673" .
+ "2e43616c656e6461724800122b0a0d63616c656e6461725f646174651809" .
+ "2001280b32122e677466732e43616c656e646172446174654800122d0a0e" .
+ "666172655f617474726962757465180a2001280b32132e677466732e4661" .
+ "7265417474726962757465480012230a09666172655f72756c65180b2001" .
+ "280b320e2e677466732e4661726552756c654800121c0a05736861706518" .
+ "0c2001280b320b2e677466732e5368617065480012240a09667265717565" .
+ "6e6379180d2001280b320f2e677466732e4672657175656e637948001222" .
+ "0a087472616e73666572180e2001280b320e2e677466732e5472616e7366" .
+ "6572480012280a09657874656e73696f6e18d00f2001280b32142e676f6f" .
+ "676c652e70726f746f6275662e416e7942090a07656c656d656e744a0608" .
+ "e80710d00f22d3010a064167656e637912110a096167656e63795f696418" .
+ "012001280912130a0b6167656e63795f6e616d6518022001280912120a0a" .
+ "6167656e63795f75726c18032001280912170a0f6167656e63795f74696d" .
+ "657a6f6e6518042001280912130a0b6167656e63795f6c616e6718052001" .
+ "280912140a0c6167656e63795f70686f6e6518062001280912170a0f6167" .
+ "656e63795f666172655f75726c18072001280912280a09657874656e7369" .
+ "6f6e18d00f2001280b32142e676f6f676c652e70726f746f6275662e416e" .
+ "794a0608e80710d00f2288040a0453746f70120f0a0773746f705f696418" .
+ "012001280912110a0973746f705f636f646518022001280912110a097374" .
+ "6f705f6e616d6518032001280912110a0973746f705f6465736318042001" .
+ "280912100a086c6174697475646518052001280212110a096c6f6e676974" .
+ "756465180620012802120f0a077a6f6e655f696418072001280912100a08" .
+ "73746f705f75726c180820012809122e0a0d6c6f636174696f6e5f747970" .
+ "6518092001280e32172e677466732e53746f702e4c6f636174696f6e5479" .
+ "706512160a0e706172656e745f73746174696f6e180a2001280912170a0f" .
+ "6167656e63795f74696d657a6f6e65180b20012809123a0a13776865656c" .
+ "63686169725f626f617264696e67180c2001280e321d2e677466732e5374" .
+ "6f702e576865656c6368616972426f617264696e6712280a09657874656e" .
+ "73696f6e18d00f2001280b32142e676f6f676c652e70726f746f6275662e" .
+ "416e7922580a0c4c6f636174696f6e5479706512080a0453544f50100012" .
+ "0b0a0753544154494f4e1001120c0a08454e5452414e4345100212100a0c" .
+ "47454e455249435f4e4f4445100312110a0d424f415244494e475f415245" .
+ "41100422450a12576865656c6368616972426f617264696e67120b0a0755" .
+ "4e4b4e4f574e1000120e0a0a41434345535349424c45100112120a0e4e4f" .
+ "545f41434345535349424c4510024a0608e80710d00f22fd020a05526f75" .
+ "746512100a08726f7574655f696418012001280912110a096167656e6379" .
+ "5f696418022001280912180a10726f7574655f73686f72745f6e616d6518" .
+ "032001280912170a0f726f7574655f6c6f6e675f6e616d65180420012809" .
+ "12120a0a726f7574655f6465736318052001280912290a0a726f7574655f" .
+ "7479706518062001280e32152e677466732e526f7574652e526f75746554" .
+ "79706512110a09726f7574655f75726c18072001280912130a0b726f7574" .
+ "655f636f6c6f7218082001280912180a10726f7574655f746578745f636f" .
+ "6c6f7218092001280912280a09657874656e73696f6e18d00f2001280b32" .
+ "142e676f6f676c652e70726f746f6275662e416e7922690a09526f757465" .
+ "5479706512080a045452414d1000120a0a06535542574159100112080a04" .
+ "5241494c100212070a03425553100312090a0546455252591004120c0a08" .
+ "4341424c454341521005120b0a07474f4e444f4c411006120d0a0946554e" .
+ "4943554c415210074a0608e80710d00f2297020a045472697012100a0872" .
+ "6f7574655f696418012001280912120a0a736572766963655f6964180220" .
+ "012809120f0a07747269705f696418032001280912150a0d747269705f68" .
+ "6561647369676e18042001280912170a0f747269705f73686f72745f6e61" .
+ "6d65180520012809122a0a0c646972656374696f6e5f696418062001280e" .
+ "32142e677466732e547269702e446972656374696f6e12100a08626c6f63" .
+ "6b5f696418072001280912100a0873686170655f69641808200128091228" .
+ "0a09657874656e73696f6e18d00f2001280b32142e676f6f676c652e7072" .
+ "6f746f6275662e416e7922260a09446972656374696f6e120c0a084f5554" .
+ "424f554e441000120b0a07494e424f554e4410014a0608e80710d00f2290" .
+ "030a0853746f7054696d65120f0a07747269705f69641801200128091214" .
+ "0a0c6172726976616c5f74696d6518022001280912160a0e646570617274" .
+ "7572655f74696d65180320012809120f0a0773746f705f69641804200128" .
+ "0912150a0d73746f705f73657175656e636518052001280912150a0d7374" .
+ "6f705f686561647369676e18062001280912340a0b7069636b75705f7479" .
+ "706518072001280e321f2e677466732e53746f7054696d652e417661696c" .
+ "6162696c6974795479706512360a0d64726f705f6f66665f747970651808" .
+ "2001280e321f2e677466732e53746f7054696d652e417661696c6162696c" .
+ "69747954797065121b0a1373686170655f646973745f74726176656c6564" .
+ "18092001280212280a09657874656e73696f6e18d00f2001280b32142e67" .
+ "6f6f676c652e70726f746f6275662e416e7922490a10417661696c616269" .
+ "6c69747954797065120b0a07524547554c4152100012110a0d4e4f545f41" .
+ "5641494c41424c45100112090a0550484f4e451002120a0a064452495645" .
+ "5210034a0608e80710d00f22e3030a0843616c656e64617212120a0a7365" .
+ "72766963655f6964180120012809122a0a066d6f6e64617918022001280e" .
+ "321a2e677466732e43616c656e6461722e43616c656e646172446179122b" .
+ "0a077475657364617918032001280e321a2e677466732e43616c656e6461" .
+ "722e43616c656e646172446179122d0a097765646e657364617918042001" .
+ "280e321a2e677466732e43616c656e6461722e43616c656e646172446179" .
+ "122c0a08746875727364617918052001280e321a2e677466732e43616c65" .
+ "6e6461722e43616c656e646172446179122a0a0666726964617918062001" .
+ "280e321a2e677466732e43616c656e6461722e43616c656e646172446179" .
+ "122c0a08736174757264617918072001280e321a2e677466732e43616c65" .
+ "6e6461722e43616c656e646172446179122a0a0673756e64617918082001" .
+ "280e321a2e677466732e43616c656e6461722e43616c656e646172446179" .
+ "12120a0a73746172745f6461746518092001280912100a08656e645f6461" .
+ "7465180a2001280912280a09657874656e73696f6e18d00f2001280b3214" .
+ "2e676f6f676c652e70726f746f6275662e416e79222f0a0b43616c656e64" .
+ "617244617912110a0d4e4f545f415641494c41424c451000120d0a094156" .
+ "41494c41424c4510014a0608e80710d00f22d9010a0c43616c656e646172" .
+ "4461746512120a0a736572766963655f6964180120012809120c0a046461" .
+ "746518022001280912380a0e657863657074696f6e5f7479706518032001" .
+ "280e32202e677466732e43616c656e646172446174652e45786365707469" .
+ "6f6e5479706512280a09657874656e73696f6e18d00f2001280b32142e67" .
+ "6f6f676c652e70726f746f6275662e416e79223b0a0d457863657074696f" .
+ "6e5479706512120a0e554e555345445f554e4b4e4f574e100012090a0541" .
+ "444445441001120b0a0752454d4f56454410024a0608e80710d00f22e802" .
+ "0a0d46617265417474726962757465120f0a07666172655f696418012001" .
+ "2809120d0a05707269636518022001280212150a0d63757272656e63795f" .
+ "7479706518032001280912390a0e7061796d656e745f6d6574686f641804" .
+ "2001280e32212e677466732e466172654174747269627574652e5061796d" .
+ "656e744d6574686f6412300a097472616e736665727318052001280e321d" .
+ "2e677466732e466172654174747269627574652e5472616e736665727312" .
+ "190a117472616e736665725f6475726174696f6e18062001280512280a09" .
+ "657874656e73696f6e18d00f2001280b32142e676f6f676c652e70726f74" .
+ "6f6275662e416e79222d0a0d5061796d656e744d6574686f64120b0a074f" .
+ "4e424f4152441000120f0a0b505245424f415244494e47100122370a0954" .
+ "72616e736665727312060a024e4f100012080a044f4e4345100112090a05" .
+ "54574943451002120d0a09554e4c494d4954454410034a0608e80710d00f" .
+ "229f010a084661726552756c65120f0a07666172655f6964180120012809" .
+ "12100a08726f7574655f696418022001280912110a096f726967696e5f69" .
+ "6418032001280912160a0e64657374696e6174696f6e5f69641804200128" .
+ "0912130a0b636f6e7461696e735f696418052001280912280a0965787465" .
+ "6e73696f6e18d00f2001280b32142e676f6f676c652e70726f746f627566" .
+ "2e416e794a0608e80710d00f22af010a05536861706512100a0873686170" .
+ "655f696418012001280912140a0c73686170655f70745f6c617418022001" .
+ "280212140a0c73686170655f70745f6c6f6e18032001280212190a117368" .
+ "6170655f70745f73657175656e6365180420012805121b0a137368617065" .
+ "5f646973745f74726176656c656418052001280212280a09657874656e73" .
+ "696f6e18d00f2001280b32142e676f6f676c652e70726f746f6275662e41" .
+ "6e794a0608e80710d00f22eb010a094672657175656e6379120f0a077472" .
+ "69705f696418012001280912120a0a73746172745f74696d651802200128" .
+ "0912100a08656e645f74696d6518032001280912140a0c68656164776179" .
+ "5f7365637318042001280512310a0b65786163745f74696d657318052001" .
+ "280e321c2e677466732e4672657175656e63792e5363686564756c655479" .
+ "706512280a09657874656e73696f6e18d00f2001280b32142e676f6f676c" .
+ "652e70726f746f6275662e416e79222c0a0c5363686564756c6554797065" .
+ "120f0a0b4e4f545f45584143544c591000120b0a0745584143544c591001" .
+ "4a0608e80710d00f2280020a085472616e7366657212140a0c66726f6d5f" .
+ "73746f705f696418012001280912120a0a746f5f73746f705f6964180220" .
+ "01280912320a0d7472616e736665725f7479706518032001280e321b2e67" .
+ "7466732e5472616e736665722e5472616e736665725479706512190a116d" .
+ "696e5f7472616e736665725f74696d6518042001280512280a0965787465" .
+ "6e73696f6e18d00f2001280b32142e676f6f676c652e70726f746f627566" .
+ "2e416e7922490a0c5472616e7366657254797065120f0a0b5245434f4d4d" .
+ "454e444544100012090a0554494d45441001120b0a074d494e494d554d10" .
+ "0212100a0c4e4f545f504f535349424c4510034a0608e80710d00f620670" .
+ "726f746f33"
+ ), true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/inc/Gtfs/Agency.php b/inc/Gtfs/Agency.php
new file mode 100644
index 0000000..43f1f3c
--- /dev/null
+++ b/inc/Gtfs/Agency.php
@@ -0,0 +1,307 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.Agency</code>
+ */
+class Agency extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The agency_id field is an ID that uniquely identifies a transit agency.
+ *
+ * Generated from protobuf field <code>string agency_id = 1;</code>
+ */
+ protected $agency_id = '';
+ /**
+ * The agency_name field contains the full name of the transit agency.
+ *
+ * Generated from protobuf field <code>string agency_name = 2;</code>
+ */
+ protected $agency_name = '';
+ /**
+ * The agency_url field contains the URL of the transit agency.
+ *
+ * Generated from protobuf field <code>string agency_url = 3;</code>
+ */
+ protected $agency_url = '';
+ /**
+ * The agency_timezone field contains the timezone where the transit agency is located.
+ *
+ * Generated from protobuf field <code>string agency_timezone = 4;</code>
+ */
+ protected $agency_timezone = '';
+ /**
+ * The agency_lang field contains a two-letter ISO 639-1 code for the primary language used by this transit agency.
+ *
+ * Generated from protobuf field <code>string agency_lang = 5;</code>
+ */
+ protected $agency_lang = '';
+ /**
+ * The agency_phone field contains a single voice telephone number for the specified agency.
+ *
+ * Generated from protobuf field <code>string agency_phone = 6;</code>
+ */
+ protected $agency_phone = '';
+ /**
+ * The agency_fare_url specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online.
+ *
+ * Generated from protobuf field <code>string agency_fare_url = 7;</code>
+ */
+ protected $agency_fare_url = '';
+ /**
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $agency_id
+ * The agency_id field is an ID that uniquely identifies a transit agency.
+ * @type string $agency_name
+ * The agency_name field contains the full name of the transit agency.
+ * @type string $agency_url
+ * The agency_url field contains the URL of the transit agency.
+ * @type string $agency_timezone
+ * The agency_timezone field contains the timezone where the transit agency is located.
+ * @type string $agency_lang
+ * The agency_lang field contains a two-letter ISO 639-1 code for the primary language used by this transit agency.
+ * @type string $agency_phone
+ * The agency_phone field contains a single voice telephone number for the specified agency.
+ * @type string $agency_fare_url
+ * The agency_fare_url specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online.
+ * @type \Google\Protobuf\Any $extension
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The agency_id field is an ID that uniquely identifies a transit agency.
+ *
+ * Generated from protobuf field <code>string agency_id = 1;</code>
+ * @return string
+ */
+ public function getAgencyId()
+ {
+ return $this->agency_id;
+ }
+
+ /**
+ * The agency_id field is an ID that uniquely identifies a transit agency.
+ *
+ * Generated from protobuf field <code>string agency_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setAgencyId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->agency_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The agency_name field contains the full name of the transit agency.
+ *
+ * Generated from protobuf field <code>string agency_name = 2;</code>
+ * @return string
+ */
+ public function getAgencyName()
+ {
+ return $this->agency_name;
+ }
+
+ /**
+ * The agency_name field contains the full name of the transit agency.
+ *
+ * Generated from protobuf field <code>string agency_name = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setAgencyName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->agency_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The agency_url field contains the URL of the transit agency.
+ *
+ * Generated from protobuf field <code>string agency_url = 3;</code>
+ * @return string
+ */
+ public function getAgencyUrl()
+ {
+ return $this->agency_url;
+ }
+
+ /**
+ * The agency_url field contains the URL of the transit agency.
+ *
+ * Generated from protobuf field <code>string agency_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setAgencyUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->agency_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * The agency_timezone field contains the timezone where the transit agency is located.
+ *
+ * Generated from protobuf field <code>string agency_timezone = 4;</code>
+ * @return string
+ */
+ public function getAgencyTimezone()
+ {
+ return $this->agency_timezone;
+ }
+
+ /**
+ * The agency_timezone field contains the timezone where the transit agency is located.
+ *
+ * Generated from protobuf field <code>string agency_timezone = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setAgencyTimezone($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->agency_timezone = $var;
+
+ return $this;
+ }
+
+ /**
+ * The agency_lang field contains a two-letter ISO 639-1 code for the primary language used by this transit agency.
+ *
+ * Generated from protobuf field <code>string agency_lang = 5;</code>
+ * @return string
+ */
+ public function getAgencyLang()
+ {
+ return $this->agency_lang;
+ }
+
+ /**
+ * The agency_lang field contains a two-letter ISO 639-1 code for the primary language used by this transit agency.
+ *
+ * Generated from protobuf field <code>string agency_lang = 5;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setAgencyLang($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->agency_lang = $var;
+
+ return $this;
+ }
+
+ /**
+ * The agency_phone field contains a single voice telephone number for the specified agency.
+ *
+ * Generated from protobuf field <code>string agency_phone = 6;</code>
+ * @return string
+ */
+ public function getAgencyPhone()
+ {
+ return $this->agency_phone;
+ }
+
+ /**
+ * The agency_phone field contains a single voice telephone number for the specified agency.
+ *
+ * Generated from protobuf field <code>string agency_phone = 6;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setAgencyPhone($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->agency_phone = $var;
+
+ return $this;
+ }
+
+ /**
+ * The agency_fare_url specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online.
+ *
+ * Generated from protobuf field <code>string agency_fare_url = 7;</code>
+ * @return string
+ */
+ public function getAgencyFareUrl()
+ {
+ return $this->agency_fare_url;
+ }
+
+ /**
+ * The agency_fare_url specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online.
+ *
+ * Generated from protobuf field <code>string agency_fare_url = 7;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setAgencyFareUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->agency_fare_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/Calendar.php b/inc/Gtfs/Calendar.php
new file mode 100644
index 0000000..2536d81
--- /dev/null
+++ b/inc/Gtfs/Calendar.php
@@ -0,0 +1,350 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.Calendar</code>
+ */
+class Calendar extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string service_id = 1;</code>
+ */
+ protected $service_id = '';
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay monday = 2;</code>
+ */
+ protected $monday = 0;
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay tuesday = 3;</code>
+ */
+ protected $tuesday = 0;
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay wednesday = 4;</code>
+ */
+ protected $wednesday = 0;
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay thursday = 5;</code>
+ */
+ protected $thursday = 0;
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay friday = 6;</code>
+ */
+ protected $friday = 0;
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay saturday = 7;</code>
+ */
+ protected $saturday = 0;
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay sunday = 8;</code>
+ */
+ protected $sunday = 0;
+ /**
+ * Generated from protobuf field <code>string start_date = 9;</code>
+ */
+ protected $start_date = '';
+ /**
+ * Generated from protobuf field <code>string end_date = 10;</code>
+ */
+ protected $end_date = '';
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $service_id
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ * @type int $monday
+ * @type int $tuesday
+ * @type int $wednesday
+ * @type int $thursday
+ * @type int $friday
+ * @type int $saturday
+ * @type int $sunday
+ * @type string $start_date
+ * @type string $end_date
+ * @type \Google\Protobuf\Any $extension
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string service_id = 1;</code>
+ * @return string
+ */
+ public function getServiceId()
+ {
+ return $this->service_id;
+ }
+
+ /**
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string service_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setServiceId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay monday = 2;</code>
+ * @return int
+ */
+ public function getMonday()
+ {
+ return $this->monday;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay monday = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setMonday($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Calendar_CalendarDay::class);
+ $this->monday = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay tuesday = 3;</code>
+ * @return int
+ */
+ public function getTuesday()
+ {
+ return $this->tuesday;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay tuesday = 3;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setTuesday($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Calendar_CalendarDay::class);
+ $this->tuesday = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay wednesday = 4;</code>
+ * @return int
+ */
+ public function getWednesday()
+ {
+ return $this->wednesday;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay wednesday = 4;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setWednesday($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Calendar_CalendarDay::class);
+ $this->wednesday = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay thursday = 5;</code>
+ * @return int
+ */
+ public function getThursday()
+ {
+ return $this->thursday;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay thursday = 5;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setThursday($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Calendar_CalendarDay::class);
+ $this->thursday = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay friday = 6;</code>
+ * @return int
+ */
+ public function getFriday()
+ {
+ return $this->friday;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay friday = 6;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setFriday($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Calendar_CalendarDay::class);
+ $this->friday = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay saturday = 7;</code>
+ * @return int
+ */
+ public function getSaturday()
+ {
+ return $this->saturday;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay saturday = 7;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setSaturday($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Calendar_CalendarDay::class);
+ $this->saturday = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay sunday = 8;</code>
+ * @return int
+ */
+ public function getSunday()
+ {
+ return $this->sunday;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar.CalendarDay sunday = 8;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setSunday($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Calendar_CalendarDay::class);
+ $this->sunday = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string start_date = 9;</code>
+ * @return string
+ */
+ public function getStartDate()
+ {
+ return $this->start_date;
+ }
+
+ /**
+ * Generated from protobuf field <code>string start_date = 9;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStartDate($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->start_date = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string end_date = 10;</code>
+ * @return string
+ */
+ public function getEndDate()
+ {
+ return $this->end_date;
+ }
+
+ /**
+ * Generated from protobuf field <code>string end_date = 10;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setEndDate($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->end_date = $var;
+
+ return $this;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/Calendar/CalendarDay.php b/inc/Gtfs/Calendar/CalendarDay.php
new file mode 100644
index 0000000..12b6667
--- /dev/null
+++ b/inc/Gtfs/Calendar/CalendarDay.php
@@ -0,0 +1,51 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs\Calendar;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>gtfs.Calendar.CalendarDay</code>
+ */
+class CalendarDay
+{
+ /**
+ * Generated from protobuf enum <code>NOT_AVAILABLE = 0;</code>
+ */
+ const NOT_AVAILABLE = 0;
+ /**
+ * Generated from protobuf enum <code>AVAILABLE = 1;</code>
+ */
+ const AVAILABLE = 1;
+
+ private static $valueToName = [
+ self::NOT_AVAILABLE => 'NOT_AVAILABLE',
+ self::AVAILABLE => 'AVAILABLE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(CalendarDay::class, \Gtfs\Calendar_CalendarDay::class);
+
diff --git a/inc/Gtfs/CalendarDate.php b/inc/Gtfs/CalendarDate.php
new file mode 100644
index 0000000..a3f9240
--- /dev/null
+++ b/inc/Gtfs/CalendarDate.php
@@ -0,0 +1,161 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.CalendarDate</code>
+ */
+class CalendarDate extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string service_id = 1;</code>
+ */
+ protected $service_id = '';
+ /**
+ * Generated from protobuf field <code>string date = 2;</code>
+ */
+ protected $date = '';
+ /**
+ * Generated from protobuf field <code>.gtfs.CalendarDate.ExceptionType exception_type = 3;</code>
+ */
+ protected $exception_type = 0;
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $service_id
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ * @type string $date
+ * @type int $exception_type
+ * @type \Google\Protobuf\Any $extension
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string service_id = 1;</code>
+ * @return string
+ */
+ public function getServiceId()
+ {
+ return $this->service_id;
+ }
+
+ /**
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string service_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setServiceId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string date = 2;</code>
+ * @return string
+ */
+ public function getDate()
+ {
+ return $this->date;
+ }
+
+ /**
+ * Generated from protobuf field <code>string date = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setDate($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->date = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.CalendarDate.ExceptionType exception_type = 3;</code>
+ * @return int
+ */
+ public function getExceptionType()
+ {
+ return $this->exception_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.CalendarDate.ExceptionType exception_type = 3;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setExceptionType($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\CalendarDate_ExceptionType::class);
+ $this->exception_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/CalendarDate/ExceptionType.php b/inc/Gtfs/CalendarDate/ExceptionType.php
new file mode 100644
index 0000000..11a0024
--- /dev/null
+++ b/inc/Gtfs/CalendarDate/ExceptionType.php
@@ -0,0 +1,56 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs\CalendarDate;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>gtfs.CalendarDate.ExceptionType</code>
+ */
+class ExceptionType
+{
+ /**
+ * Generated from protobuf enum <code>UNUSED_UNKNOWN = 0;</code>
+ */
+ const UNUSED_UNKNOWN = 0;
+ /**
+ * Generated from protobuf enum <code>ADDED = 1;</code>
+ */
+ const ADDED = 1;
+ /**
+ * Generated from protobuf enum <code>REMOVED = 2;</code>
+ */
+ const REMOVED = 2;
+
+ private static $valueToName = [
+ self::UNUSED_UNKNOWN => 'UNUSED_UNKNOWN',
+ self::ADDED => 'ADDED',
+ self::REMOVED => 'REMOVED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ExceptionType::class, \Gtfs\CalendarDate_ExceptionType::class);
+
diff --git a/inc/Gtfs/CalendarDate_ExceptionType.php b/inc/Gtfs/CalendarDate_ExceptionType.php
new file mode 100644
index 0000000..46dcd0c
--- /dev/null
+++ b/inc/Gtfs/CalendarDate_ExceptionType.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Gtfs\CalendarDate\ExceptionType instead.
+ * @deprecated
+ */
+ class CalendarDate_ExceptionType {}
+}
+class_exists(CalendarDate\ExceptionType::class);
+@trigger_error('Gtfs\CalendarDate_ExceptionType is deprecated and will be removed in the next major release. Use Gtfs\CalendarDate\ExceptionType instead', E_USER_DEPRECATED);
+
diff --git a/inc/Gtfs/Calendar_CalendarDay.php b/inc/Gtfs/Calendar_CalendarDay.php
new file mode 100644
index 0000000..00964cc
--- /dev/null
+++ b/inc/Gtfs/Calendar_CalendarDay.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Gtfs\Calendar\CalendarDay instead.
+ * @deprecated
+ */
+ class Calendar_CalendarDay {}
+}
+class_exists(Calendar\CalendarDay::class);
+@trigger_error('Gtfs\Calendar_CalendarDay is deprecated and will be removed in the next major release. Use Gtfs\Calendar\CalendarDay instead', E_USER_DEPRECATED);
+
diff --git a/inc/Gtfs/FareAttribute.php b/inc/Gtfs/FareAttribute.php
new file mode 100644
index 0000000..81e62ec
--- /dev/null
+++ b/inc/Gtfs/FareAttribute.php
@@ -0,0 +1,235 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.FareAttribute</code>
+ */
+class FareAttribute extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>string fare_id = 1;</code>
+ */
+ protected $fare_id = '';
+ /**
+ * Generated from protobuf field <code>float price = 2;</code>
+ */
+ protected $price = 0.0;
+ /**
+ * Generated from protobuf field <code>string currency_type = 3;</code>
+ */
+ protected $currency_type = '';
+ /**
+ * Generated from protobuf field <code>.gtfs.FareAttribute.PaymentMethod payment_method = 4;</code>
+ */
+ protected $payment_method = 0;
+ /**
+ * Generated from protobuf field <code>.gtfs.FareAttribute.Transfers transfers = 5;</code>
+ */
+ protected $transfers = 0;
+ /**
+ * Generated from protobuf field <code>int32 transfer_duration = 6;</code>
+ */
+ protected $transfer_duration = 0;
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $fare_id
+ * @type float $price
+ * @type string $currency_type
+ * @type int $payment_method
+ * @type int $transfers
+ * @type int $transfer_duration
+ * @type \Google\Protobuf\Any $extension
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>string fare_id = 1;</code>
+ * @return string
+ */
+ public function getFareId()
+ {
+ return $this->fare_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>string fare_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setFareId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->fare_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>float price = 2;</code>
+ * @return float
+ */
+ public function getPrice()
+ {
+ return $this->price;
+ }
+
+ /**
+ * Generated from protobuf field <code>float price = 2;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setPrice($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->price = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string currency_type = 3;</code>
+ * @return string
+ */
+ public function getCurrencyType()
+ {
+ return $this->currency_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>string currency_type = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setCurrencyType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->currency_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.FareAttribute.PaymentMethod payment_method = 4;</code>
+ * @return int
+ */
+ public function getPaymentMethod()
+ {
+ return $this->payment_method;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.FareAttribute.PaymentMethod payment_method = 4;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setPaymentMethod($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\FareAttribute_PaymentMethod::class);
+ $this->payment_method = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.FareAttribute.Transfers transfers = 5;</code>
+ * @return int
+ */
+ public function getTransfers()
+ {
+ return $this->transfers;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.FareAttribute.Transfers transfers = 5;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setTransfers($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\FareAttribute_Transfers::class);
+ $this->transfers = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>int32 transfer_duration = 6;</code>
+ * @return int
+ */
+ public function getTransferDuration()
+ {
+ return $this->transfer_duration;
+ }
+
+ /**
+ * Generated from protobuf field <code>int32 transfer_duration = 6;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setTransferDuration($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->transfer_duration = $var;
+
+ return $this;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/FareAttribute/PaymentMethod.php b/inc/Gtfs/FareAttribute/PaymentMethod.php
new file mode 100644
index 0000000..12d828f
--- /dev/null
+++ b/inc/Gtfs/FareAttribute/PaymentMethod.php
@@ -0,0 +1,51 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs\FareAttribute;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>gtfs.FareAttribute.PaymentMethod</code>
+ */
+class PaymentMethod
+{
+ /**
+ * Generated from protobuf enum <code>ONBOARD = 0;</code>
+ */
+ const ONBOARD = 0;
+ /**
+ * Generated from protobuf enum <code>PREBOARDING = 1;</code>
+ */
+ const PREBOARDING = 1;
+
+ private static $valueToName = [
+ self::ONBOARD => 'ONBOARD',
+ self::PREBOARDING => 'PREBOARDING',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(PaymentMethod::class, \Gtfs\FareAttribute_PaymentMethod::class);
+
diff --git a/inc/Gtfs/FareAttribute/Transfers.php b/inc/Gtfs/FareAttribute/Transfers.php
new file mode 100644
index 0000000..66d3f0e
--- /dev/null
+++ b/inc/Gtfs/FareAttribute/Transfers.php
@@ -0,0 +1,61 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs\FareAttribute;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>gtfs.FareAttribute.Transfers</code>
+ */
+class Transfers
+{
+ /**
+ * Generated from protobuf enum <code>NO = 0;</code>
+ */
+ const NO = 0;
+ /**
+ * Generated from protobuf enum <code>ONCE = 1;</code>
+ */
+ const ONCE = 1;
+ /**
+ * Generated from protobuf enum <code>TWICE = 2;</code>
+ */
+ const TWICE = 2;
+ /**
+ * Generated from protobuf enum <code>UNLIMITED = 3;</code>
+ */
+ const UNLIMITED = 3;
+
+ private static $valueToName = [
+ self::NO => 'NO',
+ self::ONCE => 'ONCE',
+ self::TWICE => 'TWICE',
+ self::UNLIMITED => 'UNLIMITED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Transfers::class, \Gtfs\FareAttribute_Transfers::class);
+
diff --git a/inc/Gtfs/FareAttribute_PaymentMethod.php b/inc/Gtfs/FareAttribute_PaymentMethod.php
new file mode 100644
index 0000000..216c76b
--- /dev/null
+++ b/inc/Gtfs/FareAttribute_PaymentMethod.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Gtfs\FareAttribute\PaymentMethod instead.
+ * @deprecated
+ */
+ class FareAttribute_PaymentMethod {}
+}
+class_exists(FareAttribute\PaymentMethod::class);
+@trigger_error('Gtfs\FareAttribute_PaymentMethod is deprecated and will be removed in the next major release. Use Gtfs\FareAttribute\PaymentMethod instead', E_USER_DEPRECATED);
+
diff --git a/inc/Gtfs/FareAttribute_Transfers.php b/inc/Gtfs/FareAttribute_Transfers.php
new file mode 100644
index 0000000..8dffd82
--- /dev/null
+++ b/inc/Gtfs/FareAttribute_Transfers.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Gtfs\FareAttribute\Transfers instead.
+ * @deprecated
+ */
+ class FareAttribute_Transfers {}
+}
+class_exists(FareAttribute\Transfers::class);
+@trigger_error('Gtfs\FareAttribute_Transfers is deprecated and will be removed in the next major release. Use Gtfs\FareAttribute\Transfers instead', E_USER_DEPRECATED);
+
diff --git a/inc/Gtfs/FareRule.php b/inc/Gtfs/FareRule.php
new file mode 100644
index 0000000..bc5f0ac
--- /dev/null
+++ b/inc/Gtfs/FareRule.php
@@ -0,0 +1,208 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.FareRule</code>
+ */
+class FareRule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>string fare_id = 1;</code>
+ */
+ protected $fare_id = '';
+ /**
+ * Generated from protobuf field <code>string route_id = 2;</code>
+ */
+ protected $route_id = '';
+ /**
+ * Generated from protobuf field <code>string origin_id = 3;</code>
+ */
+ protected $origin_id = '';
+ /**
+ * Generated from protobuf field <code>string destination_id = 4;</code>
+ */
+ protected $destination_id = '';
+ /**
+ * Generated from protobuf field <code>string contains_id = 5;</code>
+ */
+ protected $contains_id = '';
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $fare_id
+ * @type string $route_id
+ * @type string $origin_id
+ * @type string $destination_id
+ * @type string $contains_id
+ * @type \Google\Protobuf\Any $extension
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>string fare_id = 1;</code>
+ * @return string
+ */
+ public function getFareId()
+ {
+ return $this->fare_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>string fare_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setFareId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->fare_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string route_id = 2;</code>
+ * @return string
+ */
+ public function getRouteId()
+ {
+ return $this->route_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>string route_id = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setRouteId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->route_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string origin_id = 3;</code>
+ * @return string
+ */
+ public function getOriginId()
+ {
+ return $this->origin_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>string origin_id = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setOriginId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->origin_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string destination_id = 4;</code>
+ * @return string
+ */
+ public function getDestinationId()
+ {
+ return $this->destination_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>string destination_id = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setDestinationId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->destination_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string contains_id = 5;</code>
+ * @return string
+ */
+ public function getContainsId()
+ {
+ return $this->contains_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>string contains_id = 5;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setContainsId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->contains_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/FeedEntity.php b/inc/Gtfs/FeedEntity.php
new file mode 100644
index 0000000..b77caca
--- /dev/null
+++ b/inc/Gtfs/FeedEntity.php
@@ -0,0 +1,445 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A definition (or update) of an entity in the transit feed.
+ *
+ * Generated from protobuf message <code>gtfs.FeedEntity</code>
+ */
+class FeedEntity extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
+ *
+ * Generated from protobuf field <code>string id = 1;</code>
+ */
+ protected $id = '';
+ /**
+ * Whether this entity is to be deleted. Relevant only for incremental
+ * fetches.
+ *
+ * Generated from protobuf field <code>bool is_deleted = 2;</code>
+ */
+ protected $is_deleted = false;
+ /**
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+ protected $element;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $id
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
+ * @type bool $is_deleted
+ * Whether this entity is to be deleted. Relevant only for incremental
+ * fetches.
+ * @type \Gtfs\Agency $agency
+ * @type \Gtfs\Stop $stop
+ * @type \Gtfs\Route $route
+ * @type \Gtfs\Trip $trip
+ * @type \Gtfs\StopTime $stop_time
+ * @type \Gtfs\Calendar $calendar
+ * @type \Gtfs\CalendarDate $calendar_date
+ * @type \Gtfs\FareAttribute $fare_attribute
+ * @type \Gtfs\FareRule $fare_rule
+ * @type \Gtfs\Shape $shape
+ * @type \Gtfs\Frequency $frequency
+ * @type \Gtfs\Transfer $transfer
+ * @type \Google\Protobuf\Any $extension
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
+ *
+ * Generated from protobuf field <code>string id = 1;</code>
+ * @return string
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
+ *
+ * Generated from protobuf field <code>string id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Whether this entity is to be deleted. Relevant only for incremental
+ * fetches.
+ *
+ * Generated from protobuf field <code>bool is_deleted = 2;</code>
+ * @return bool
+ */
+ public function getIsDeleted()
+ {
+ return $this->is_deleted;
+ }
+
+ /**
+ * Whether this entity is to be deleted. Relevant only for incremental
+ * fetches.
+ *
+ * Generated from protobuf field <code>bool is_deleted = 2;</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setIsDeleted($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->is_deleted = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Agency agency = 3;</code>
+ * @return \Gtfs\Agency
+ */
+ public function getAgency()
+ {
+ return $this->readOneof(3);
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Agency agency = 3;</code>
+ * @param \Gtfs\Agency $var
+ * @return $this
+ */
+ public function setAgency($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\Agency::class);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Stop stop = 4;</code>
+ * @return \Gtfs\Stop
+ */
+ public function getStop()
+ {
+ return $this->readOneof(4);
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Stop stop = 4;</code>
+ * @param \Gtfs\Stop $var
+ * @return $this
+ */
+ public function setStop($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\Stop::class);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Route route = 5;</code>
+ * @return \Gtfs\Route
+ */
+ public function getRoute()
+ {
+ return $this->readOneof(5);
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Route route = 5;</code>
+ * @param \Gtfs\Route $var
+ * @return $this
+ */
+ public function setRoute($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\Route::class);
+ $this->writeOneof(5, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Trip trip = 6;</code>
+ * @return \Gtfs\Trip
+ */
+ public function getTrip()
+ {
+ return $this->readOneof(6);
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Trip trip = 6;</code>
+ * @param \Gtfs\Trip $var
+ * @return $this
+ */
+ public function setTrip($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\Trip::class);
+ $this->writeOneof(6, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.StopTime stop_time = 7;</code>
+ * @return \Gtfs\StopTime
+ */
+ public function getStopTime()
+ {
+ return $this->readOneof(7);
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.StopTime stop_time = 7;</code>
+ * @param \Gtfs\StopTime $var
+ * @return $this
+ */
+ public function setStopTime($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\StopTime::class);
+ $this->writeOneof(7, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar calendar = 8;</code>
+ * @return \Gtfs\Calendar
+ */
+ public function getCalendar()
+ {
+ return $this->readOneof(8);
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Calendar calendar = 8;</code>
+ * @param \Gtfs\Calendar $var
+ * @return $this
+ */
+ public function setCalendar($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\Calendar::class);
+ $this->writeOneof(8, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.CalendarDate calendar_date = 9;</code>
+ * @return \Gtfs\CalendarDate
+ */
+ public function getCalendarDate()
+ {
+ return $this->readOneof(9);
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.CalendarDate calendar_date = 9;</code>
+ * @param \Gtfs\CalendarDate $var
+ * @return $this
+ */
+ public function setCalendarDate($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\CalendarDate::class);
+ $this->writeOneof(9, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.FareAttribute fare_attribute = 10;</code>
+ * @return \Gtfs\FareAttribute
+ */
+ public function getFareAttribute()
+ {
+ return $this->readOneof(10);
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.FareAttribute fare_attribute = 10;</code>
+ * @param \Gtfs\FareAttribute $var
+ * @return $this
+ */
+ public function setFareAttribute($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\FareAttribute::class);
+ $this->writeOneof(10, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.FareRule fare_rule = 11;</code>
+ * @return \Gtfs\FareRule
+ */
+ public function getFareRule()
+ {
+ return $this->readOneof(11);
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.FareRule fare_rule = 11;</code>
+ * @param \Gtfs\FareRule $var
+ * @return $this
+ */
+ public function setFareRule($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\FareRule::class);
+ $this->writeOneof(11, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Shape shape = 12;</code>
+ * @return \Gtfs\Shape
+ */
+ public function getShape()
+ {
+ return $this->readOneof(12);
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Shape shape = 12;</code>
+ * @param \Gtfs\Shape $var
+ * @return $this
+ */
+ public function setShape($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\Shape::class);
+ $this->writeOneof(12, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Frequency frequency = 13;</code>
+ * @return \Gtfs\Frequency
+ */
+ public function getFrequency()
+ {
+ return $this->readOneof(13);
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Frequency frequency = 13;</code>
+ * @param \Gtfs\Frequency $var
+ * @return $this
+ */
+ public function setFrequency($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\Frequency::class);
+ $this->writeOneof(13, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Transfer transfer = 14;</code>
+ * @return \Gtfs\Transfer
+ */
+ public function getTransfer()
+ {
+ return $this->readOneof(14);
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Transfer transfer = 14;</code>
+ * @param \Gtfs\Transfer $var
+ * @return $this
+ */
+ public function setTransfer($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\Transfer::class);
+ $this->writeOneof(14, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getElement()
+ {
+ return $this->whichOneof("element");
+ }
+
+}
+
diff --git a/inc/Gtfs/FeedHeader.php b/inc/Gtfs/FeedHeader.php
new file mode 100644
index 0000000..88ae19e
--- /dev/null
+++ b/inc/Gtfs/FeedHeader.php
@@ -0,0 +1,314 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Metadata about a feed, included in feed messages.
+ *
+ * Generated from protobuf message <code>gtfs.FeedHeader</code>
+ */
+class FeedHeader extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Version of the feed specification.
+ * The current version is 1.0.
+ *
+ * Generated from protobuf field <code>string gtfs_version = 1;</code>
+ */
+ protected $gtfs_version = '';
+ /**
+ * The feed_publisher_name field contains the full name of the organization that publishes the feed.
+ *
+ * Generated from protobuf field <code>string feed_publisher_name = 2;</code>
+ */
+ protected $feed_publisher_name = '';
+ /**
+ * The feed_publisher_url field contains the URL of the feed publishing organization's website.
+ *
+ * Generated from protobuf field <code>string feed_publisher_url = 3;</code>
+ */
+ protected $feed_publisher_url = '';
+ /**
+ * The feed_lang field contains a IETF BCP 47 language code specifying the default language used for the text in this feed.
+ *
+ * Generated from protobuf field <code>string feed_lang = 4;</code>
+ */
+ protected $feed_lang = '';
+ /**
+ * The feed provides complete and reliable schedule information for service in the period from the beginning of the
+ * feed_start_date day to the end of the feed_end_date day in YYYYMMDD
+ *
+ * Generated from protobuf field <code>string feed_start_date = 5;</code>
+ */
+ protected $feed_start_date = '';
+ /**
+ * Generated from protobuf field <code>string feed_end_date = 6;</code>
+ */
+ protected $feed_end_date = '';
+ /**
+ * The feed publisher can specify a string here that indicates the current version of their GTFS feed.
+ *
+ * Generated from protobuf field <code>string feed_version = 7;</code>
+ */
+ protected $feed_version = '';
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $gtfs_version
+ * Version of the feed specification.
+ * The current version is 1.0.
+ * @type string $feed_publisher_name
+ * The feed_publisher_name field contains the full name of the organization that publishes the feed.
+ * @type string $feed_publisher_url
+ * The feed_publisher_url field contains the URL of the feed publishing organization's website.
+ * @type string $feed_lang
+ * The feed_lang field contains a IETF BCP 47 language code specifying the default language used for the text in this feed.
+ * @type string $feed_start_date
+ * The feed provides complete and reliable schedule information for service in the period from the beginning of the
+ * feed_start_date day to the end of the feed_end_date day in YYYYMMDD
+ * @type string $feed_end_date
+ * @type string $feed_version
+ * The feed publisher can specify a string here that indicates the current version of their GTFS feed.
+ * @type \Google\Protobuf\Any $extension
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Version of the feed specification.
+ * The current version is 1.0.
+ *
+ * Generated from protobuf field <code>string gtfs_version = 1;</code>
+ * @return string
+ */
+ public function getGtfsVersion()
+ {
+ return $this->gtfs_version;
+ }
+
+ /**
+ * Version of the feed specification.
+ * The current version is 1.0.
+ *
+ * Generated from protobuf field <code>string gtfs_version = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setGtfsVersion($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->gtfs_version = $var;
+
+ return $this;
+ }
+
+ /**
+ * The feed_publisher_name field contains the full name of the organization that publishes the feed.
+ *
+ * Generated from protobuf field <code>string feed_publisher_name = 2;</code>
+ * @return string
+ */
+ public function getFeedPublisherName()
+ {
+ return $this->feed_publisher_name;
+ }
+
+ /**
+ * The feed_publisher_name field contains the full name of the organization that publishes the feed.
+ *
+ * Generated from protobuf field <code>string feed_publisher_name = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setFeedPublisherName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->feed_publisher_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The feed_publisher_url field contains the URL of the feed publishing organization's website.
+ *
+ * Generated from protobuf field <code>string feed_publisher_url = 3;</code>
+ * @return string
+ */
+ public function getFeedPublisherUrl()
+ {
+ return $this->feed_publisher_url;
+ }
+
+ /**
+ * The feed_publisher_url field contains the URL of the feed publishing organization's website.
+ *
+ * Generated from protobuf field <code>string feed_publisher_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setFeedPublisherUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->feed_publisher_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * The feed_lang field contains a IETF BCP 47 language code specifying the default language used for the text in this feed.
+ *
+ * Generated from protobuf field <code>string feed_lang = 4;</code>
+ * @return string
+ */
+ public function getFeedLang()
+ {
+ return $this->feed_lang;
+ }
+
+ /**
+ * The feed_lang field contains a IETF BCP 47 language code specifying the default language used for the text in this feed.
+ *
+ * Generated from protobuf field <code>string feed_lang = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setFeedLang($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->feed_lang = $var;
+
+ return $this;
+ }
+
+ /**
+ * The feed provides complete and reliable schedule information for service in the period from the beginning of the
+ * feed_start_date day to the end of the feed_end_date day in YYYYMMDD
+ *
+ * Generated from protobuf field <code>string feed_start_date = 5;</code>
+ * @return string
+ */
+ public function getFeedStartDate()
+ {
+ return $this->feed_start_date;
+ }
+
+ /**
+ * The feed provides complete and reliable schedule information for service in the period from the beginning of the
+ * feed_start_date day to the end of the feed_end_date day in YYYYMMDD
+ *
+ * Generated from protobuf field <code>string feed_start_date = 5;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setFeedStartDate($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->feed_start_date = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string feed_end_date = 6;</code>
+ * @return string
+ */
+ public function getFeedEndDate()
+ {
+ return $this->feed_end_date;
+ }
+
+ /**
+ * Generated from protobuf field <code>string feed_end_date = 6;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setFeedEndDate($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->feed_end_date = $var;
+
+ return $this;
+ }
+
+ /**
+ * The feed publisher can specify a string here that indicates the current version of their GTFS feed.
+ *
+ * Generated from protobuf field <code>string feed_version = 7;</code>
+ * @return string
+ */
+ public function getFeedVersion()
+ {
+ return $this->feed_version;
+ }
+
+ /**
+ * The feed publisher can specify a string here that indicates the current version of their GTFS feed.
+ *
+ * Generated from protobuf field <code>string feed_version = 7;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setFeedVersion($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->feed_version = $var;
+
+ return $this;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/FeedMessage.php b/inc/Gtfs/FeedMessage.php
new file mode 100644
index 0000000..26ace5f
--- /dev/null
+++ b/inc/Gtfs/FeedMessage.php
@@ -0,0 +1,99 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.FeedMessage</code>
+ */
+class FeedMessage extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Metadata about this feed and feed message.
+ *
+ * Generated from protobuf field <code>.gtfs.FeedHeader header = 1;</code>
+ */
+ protected $header = null;
+ /**
+ * Contents of the feed.
+ *
+ * Generated from protobuf field <code>repeated .gtfs.FeedEntity entity = 2;</code>
+ */
+ private $entity;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Gtfs\FeedHeader $header
+ * Metadata about this feed and feed message.
+ * @type \Gtfs\FeedEntity[]|\Google\Protobuf\Internal\RepeatedField $entity
+ * Contents of the feed.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Metadata about this feed and feed message.
+ *
+ * Generated from protobuf field <code>.gtfs.FeedHeader header = 1;</code>
+ * @return \Gtfs\FeedHeader
+ */
+ public function getHeader()
+ {
+ return $this->header;
+ }
+
+ /**
+ * Metadata about this feed and feed message.
+ *
+ * Generated from protobuf field <code>.gtfs.FeedHeader header = 1;</code>
+ * @param \Gtfs\FeedHeader $var
+ * @return $this
+ */
+ public function setHeader($var)
+ {
+ GPBUtil::checkMessage($var, \Gtfs\FeedHeader::class);
+ $this->header = $var;
+
+ return $this;
+ }
+
+ /**
+ * Contents of the feed.
+ *
+ * Generated from protobuf field <code>repeated .gtfs.FeedEntity entity = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEntity()
+ {
+ return $this->entity;
+ }
+
+ /**
+ * Contents of the feed.
+ *
+ * Generated from protobuf field <code>repeated .gtfs.FeedEntity entity = 2;</code>
+ * @param \Gtfs\FeedEntity[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setEntity($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Gtfs\FeedEntity::class);
+ $this->entity = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/Frequency.php b/inc/Gtfs/Frequency.php
new file mode 100644
index 0000000..6d53d50
--- /dev/null
+++ b/inc/Gtfs/Frequency.php
@@ -0,0 +1,208 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.Frequency</code>
+ */
+class Frequency extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>string trip_id = 1;</code>
+ */
+ protected $trip_id = '';
+ /**
+ * Generated from protobuf field <code>string start_time = 2;</code>
+ */
+ protected $start_time = '';
+ /**
+ * Generated from protobuf field <code>string end_time = 3;</code>
+ */
+ protected $end_time = '';
+ /**
+ * Generated from protobuf field <code>int32 headway_secs = 4;</code>
+ */
+ protected $headway_secs = 0;
+ /**
+ * Generated from protobuf field <code>.gtfs.Frequency.ScheduleType exact_times = 5;</code>
+ */
+ protected $exact_times = 0;
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $trip_id
+ * @type string $start_time
+ * @type string $end_time
+ * @type int $headway_secs
+ * @type int $exact_times
+ * @type \Google\Protobuf\Any $extension
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>string trip_id = 1;</code>
+ * @return string
+ */
+ public function getTripId()
+ {
+ return $this->trip_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>string trip_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTripId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->trip_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string start_time = 2;</code>
+ * @return string
+ */
+ public function getStartTime()
+ {
+ return $this->start_time;
+ }
+
+ /**
+ * Generated from protobuf field <code>string start_time = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStartTime($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->start_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string end_time = 3;</code>
+ * @return string
+ */
+ public function getEndTime()
+ {
+ return $this->end_time;
+ }
+
+ /**
+ * Generated from protobuf field <code>string end_time = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setEndTime($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->end_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>int32 headway_secs = 4;</code>
+ * @return int
+ */
+ public function getHeadwaySecs()
+ {
+ return $this->headway_secs;
+ }
+
+ /**
+ * Generated from protobuf field <code>int32 headway_secs = 4;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setHeadwaySecs($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->headway_secs = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Frequency.ScheduleType exact_times = 5;</code>
+ * @return int
+ */
+ public function getExactTimes()
+ {
+ return $this->exact_times;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Frequency.ScheduleType exact_times = 5;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setExactTimes($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Frequency_ScheduleType::class);
+ $this->exact_times = $var;
+
+ return $this;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/Frequency/ScheduleType.php b/inc/Gtfs/Frequency/ScheduleType.php
new file mode 100644
index 0000000..2fa70da
--- /dev/null
+++ b/inc/Gtfs/Frequency/ScheduleType.php
@@ -0,0 +1,51 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs\Frequency;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>gtfs.Frequency.ScheduleType</code>
+ */
+class ScheduleType
+{
+ /**
+ * Generated from protobuf enum <code>NOT_EXACTLY = 0;</code>
+ */
+ const NOT_EXACTLY = 0;
+ /**
+ * Generated from protobuf enum <code>EXACTLY = 1;</code>
+ */
+ const EXACTLY = 1;
+
+ private static $valueToName = [
+ self::NOT_EXACTLY => 'NOT_EXACTLY',
+ self::EXACTLY => 'EXACTLY',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ScheduleType::class, \Gtfs\Frequency_ScheduleType::class);
+
diff --git a/inc/Gtfs/Frequency_ScheduleType.php b/inc/Gtfs/Frequency_ScheduleType.php
new file mode 100644
index 0000000..679bb8c
--- /dev/null
+++ b/inc/Gtfs/Frequency_ScheduleType.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Gtfs\Frequency\ScheduleType instead.
+ * @deprecated
+ */
+ class Frequency_ScheduleType {}
+}
+class_exists(Frequency\ScheduleType::class);
+@trigger_error('Gtfs\Frequency_ScheduleType is deprecated and will be removed in the next major release. Use Gtfs\Frequency\ScheduleType instead', E_USER_DEPRECATED);
+
diff --git a/inc/Gtfs/Route.php b/inc/Gtfs/Route.php
new file mode 100644
index 0000000..091ae1e
--- /dev/null
+++ b/inc/Gtfs/Route.php
@@ -0,0 +1,380 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.Route</code>
+ */
+class Route extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The route_id field contains an ID that uniquely identifies a route.
+ * The route_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string route_id = 1;</code>
+ */
+ protected $route_id = '';
+ /**
+ * The agency_id field defines an agency for the specified route.
+ *
+ * Generated from protobuf field <code>string agency_id = 2;</code>
+ */
+ protected $agency_id = '';
+ /**
+ * The route_short_name contains the short name of a route.
+ *
+ * Generated from protobuf field <code>string route_short_name = 3;</code>
+ */
+ protected $route_short_name = '';
+ /**
+ * The route_long_name contains the full name of a route.
+ *
+ * Generated from protobuf field <code>string route_long_name = 4;</code>
+ */
+ protected $route_long_name = '';
+ /**
+ * The route_desc field contains a description of a route.
+ *
+ * Generated from protobuf field <code>string route_desc = 5;</code>
+ */
+ protected $route_desc = '';
+ /**
+ * Generated from protobuf field <code>.gtfs.Route.RouteType route_type = 6;</code>
+ */
+ protected $route_type = 0;
+ /**
+ * The route_url field contains the URL of a web page about that particular route.
+ *
+ * Generated from protobuf field <code>string route_url = 7;</code>
+ */
+ protected $route_url = '';
+ /**
+ * In systems that have colors assigned to routes, the route_color field defines a color that corresponds to a route.
+ * The color must be provided as a six-character hexadecimal number, for example, 00FFFF.
+ *
+ * Generated from protobuf field <code>string route_color = 8;</code>
+ */
+ protected $route_color = '';
+ /**
+ * The route_text_color field can be used to specify a legible color to use for text drawn against a background of route_color.
+ *
+ * Generated from protobuf field <code>string route_text_color = 9;</code>
+ */
+ protected $route_text_color = '';
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $route_id
+ * The route_id field contains an ID that uniquely identifies a route.
+ * The route_id is dataset unique.
+ * @type string $agency_id
+ * The agency_id field defines an agency for the specified route.
+ * @type string $route_short_name
+ * The route_short_name contains the short name of a route.
+ * @type string $route_long_name
+ * The route_long_name contains the full name of a route.
+ * @type string $route_desc
+ * The route_desc field contains a description of a route.
+ * @type int $route_type
+ * @type string $route_url
+ * The route_url field contains the URL of a web page about that particular route.
+ * @type string $route_color
+ * In systems that have colors assigned to routes, the route_color field defines a color that corresponds to a route.
+ * The color must be provided as a six-character hexadecimal number, for example, 00FFFF.
+ * @type string $route_text_color
+ * The route_text_color field can be used to specify a legible color to use for text drawn against a background of route_color.
+ * @type \Google\Protobuf\Any $extension
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The route_id field contains an ID that uniquely identifies a route.
+ * The route_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string route_id = 1;</code>
+ * @return string
+ */
+ public function getRouteId()
+ {
+ return $this->route_id;
+ }
+
+ /**
+ * The route_id field contains an ID that uniquely identifies a route.
+ * The route_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string route_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setRouteId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->route_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The agency_id field defines an agency for the specified route.
+ *
+ * Generated from protobuf field <code>string agency_id = 2;</code>
+ * @return string
+ */
+ public function getAgencyId()
+ {
+ return $this->agency_id;
+ }
+
+ /**
+ * The agency_id field defines an agency for the specified route.
+ *
+ * Generated from protobuf field <code>string agency_id = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setAgencyId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->agency_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The route_short_name contains the short name of a route.
+ *
+ * Generated from protobuf field <code>string route_short_name = 3;</code>
+ * @return string
+ */
+ public function getRouteShortName()
+ {
+ return $this->route_short_name;
+ }
+
+ /**
+ * The route_short_name contains the short name of a route.
+ *
+ * Generated from protobuf field <code>string route_short_name = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setRouteShortName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->route_short_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The route_long_name contains the full name of a route.
+ *
+ * Generated from protobuf field <code>string route_long_name = 4;</code>
+ * @return string
+ */
+ public function getRouteLongName()
+ {
+ return $this->route_long_name;
+ }
+
+ /**
+ * The route_long_name contains the full name of a route.
+ *
+ * Generated from protobuf field <code>string route_long_name = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setRouteLongName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->route_long_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The route_desc field contains a description of a route.
+ *
+ * Generated from protobuf field <code>string route_desc = 5;</code>
+ * @return string
+ */
+ public function getRouteDesc()
+ {
+ return $this->route_desc;
+ }
+
+ /**
+ * The route_desc field contains a description of a route.
+ *
+ * Generated from protobuf field <code>string route_desc = 5;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setRouteDesc($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->route_desc = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Route.RouteType route_type = 6;</code>
+ * @return int
+ */
+ public function getRouteType()
+ {
+ return $this->route_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Route.RouteType route_type = 6;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setRouteType($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Route_RouteType::class);
+ $this->route_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The route_url field contains the URL of a web page about that particular route.
+ *
+ * Generated from protobuf field <code>string route_url = 7;</code>
+ * @return string
+ */
+ public function getRouteUrl()
+ {
+ return $this->route_url;
+ }
+
+ /**
+ * The route_url field contains the URL of a web page about that particular route.
+ *
+ * Generated from protobuf field <code>string route_url = 7;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setRouteUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->route_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * In systems that have colors assigned to routes, the route_color field defines a color that corresponds to a route.
+ * The color must be provided as a six-character hexadecimal number, for example, 00FFFF.
+ *
+ * Generated from protobuf field <code>string route_color = 8;</code>
+ * @return string
+ */
+ public function getRouteColor()
+ {
+ return $this->route_color;
+ }
+
+ /**
+ * In systems that have colors assigned to routes, the route_color field defines a color that corresponds to a route.
+ * The color must be provided as a six-character hexadecimal number, for example, 00FFFF.
+ *
+ * Generated from protobuf field <code>string route_color = 8;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setRouteColor($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->route_color = $var;
+
+ return $this;
+ }
+
+ /**
+ * The route_text_color field can be used to specify a legible color to use for text drawn against a background of route_color.
+ *
+ * Generated from protobuf field <code>string route_text_color = 9;</code>
+ * @return string
+ */
+ public function getRouteTextColor()
+ {
+ return $this->route_text_color;
+ }
+
+ /**
+ * The route_text_color field can be used to specify a legible color to use for text drawn against a background of route_color.
+ *
+ * Generated from protobuf field <code>string route_text_color = 9;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setRouteTextColor($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->route_text_color = $var;
+
+ return $this;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/Route/RouteType.php b/inc/Gtfs/Route/RouteType.php
new file mode 100644
index 0000000..9e9f6cc
--- /dev/null
+++ b/inc/Gtfs/Route/RouteType.php
@@ -0,0 +1,99 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs\Route;
+
+use UnexpectedValueException;
+
+/**
+ * The route_type field describes the type of transportation used on a route.
+ *
+ * Protobuf type <code>gtfs.Route.RouteType</code>
+ */
+class RouteType
+{
+ /**
+ * Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area.
+ *
+ * Generated from protobuf enum <code>TRAM = 0;</code>
+ */
+ const TRAM = 0;
+ /**
+ * Subway, Metro. Any underground rail system within a metropolitan area.
+ *
+ * Generated from protobuf enum <code>SUBWAY = 1;</code>
+ */
+ const SUBWAY = 1;
+ /**
+ * Rail. Used for intercity or long-distance travel.
+ *
+ * Generated from protobuf enum <code>RAIL = 2;</code>
+ */
+ const RAIL = 2;
+ /**
+ * Bus. Used for short- and long-distance bus routes.
+ *
+ * Generated from protobuf enum <code>BUS = 3;</code>
+ */
+ const BUS = 3;
+ /**
+ * Ferry. Used for short- and long-distance boat service.
+ *
+ * Generated from protobuf enum <code>FERRY = 4;</code>
+ */
+ const FERRY = 4;
+ /**
+ * Cable car. Used for street-level cable cars where the cable runs beneath the car.
+ *
+ * Generated from protobuf enum <code>CABLECAR = 5;</code>
+ */
+ const CABLECAR = 5;
+ /**
+ * Gondola, Suspended cable car. Typically used for aerial cable cars where the car is suspended from the cable.
+ *
+ * Generated from protobuf enum <code>GONDOLA = 6;</code>
+ */
+ const GONDOLA = 6;
+ /**
+ * Funicular. Any rail system designed for steep inclines.
+ *
+ * Generated from protobuf enum <code>FUNICULAR = 7;</code>
+ */
+ const FUNICULAR = 7;
+
+ private static $valueToName = [
+ self::TRAM => 'TRAM',
+ self::SUBWAY => 'SUBWAY',
+ self::RAIL => 'RAIL',
+ self::BUS => 'BUS',
+ self::FERRY => 'FERRY',
+ self::CABLECAR => 'CABLECAR',
+ self::GONDOLA => 'GONDOLA',
+ self::FUNICULAR => 'FUNICULAR',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(RouteType::class, \Gtfs\Route_RouteType::class);
+
diff --git a/inc/Gtfs/Route_RouteType.php b/inc/Gtfs/Route_RouteType.php
new file mode 100644
index 0000000..3b8a42c
--- /dev/null
+++ b/inc/Gtfs/Route_RouteType.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Gtfs\Route\RouteType instead.
+ * @deprecated
+ */
+ class Route_RouteType {}
+}
+class_exists(Route\RouteType::class);
+@trigger_error('Gtfs\Route_RouteType is deprecated and will be removed in the next major release. Use Gtfs\Route\RouteType instead', E_USER_DEPRECATED);
+
diff --git a/inc/Gtfs/Shape.php b/inc/Gtfs/Shape.php
new file mode 100644
index 0000000..5396c4f
--- /dev/null
+++ b/inc/Gtfs/Shape.php
@@ -0,0 +1,208 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.Shape</code>
+ */
+class Shape extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>string shape_id = 1;</code>
+ */
+ protected $shape_id = '';
+ /**
+ * Generated from protobuf field <code>float shape_pt_lat = 2;</code>
+ */
+ protected $shape_pt_lat = 0.0;
+ /**
+ * Generated from protobuf field <code>float shape_pt_lon = 3;</code>
+ */
+ protected $shape_pt_lon = 0.0;
+ /**
+ * Generated from protobuf field <code>int32 shape_pt_sequence = 4;</code>
+ */
+ protected $shape_pt_sequence = 0;
+ /**
+ * Generated from protobuf field <code>float shape_dist_traveled = 5;</code>
+ */
+ protected $shape_dist_traveled = 0.0;
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $shape_id
+ * @type float $shape_pt_lat
+ * @type float $shape_pt_lon
+ * @type int $shape_pt_sequence
+ * @type float $shape_dist_traveled
+ * @type \Google\Protobuf\Any $extension
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>string shape_id = 1;</code>
+ * @return string
+ */
+ public function getShapeId()
+ {
+ return $this->shape_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>string shape_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setShapeId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->shape_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>float shape_pt_lat = 2;</code>
+ * @return float
+ */
+ public function getShapePtLat()
+ {
+ return $this->shape_pt_lat;
+ }
+
+ /**
+ * Generated from protobuf field <code>float shape_pt_lat = 2;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setShapePtLat($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->shape_pt_lat = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>float shape_pt_lon = 3;</code>
+ * @return float
+ */
+ public function getShapePtLon()
+ {
+ return $this->shape_pt_lon;
+ }
+
+ /**
+ * Generated from protobuf field <code>float shape_pt_lon = 3;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setShapePtLon($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->shape_pt_lon = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>int32 shape_pt_sequence = 4;</code>
+ * @return int
+ */
+ public function getShapePtSequence()
+ {
+ return $this->shape_pt_sequence;
+ }
+
+ /**
+ * Generated from protobuf field <code>int32 shape_pt_sequence = 4;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setShapePtSequence($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->shape_pt_sequence = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>float shape_dist_traveled = 5;</code>
+ * @return float
+ */
+ public function getShapeDistTraveled()
+ {
+ return $this->shape_dist_traveled;
+ }
+
+ /**
+ * Generated from protobuf field <code>float shape_dist_traveled = 5;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setShapeDistTraveled($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->shape_dist_traveled = $var;
+
+ return $this;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/Stop.php b/inc/Gtfs/Stop.php
new file mode 100644
index 0000000..ae0170b
--- /dev/null
+++ b/inc/Gtfs/Stop.php
@@ -0,0 +1,454 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.Stop</code>
+ */
+class Stop extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The stop_id field contains an ID that uniquely identifies a stop or station.
+ * Multiple routes may use the same stop. stop_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string stop_id = 1;</code>
+ */
+ protected $stop_id = '';
+ /**
+ * The stop_code field contains short text or a number that uniquely identifies the stop for passengers.
+ *
+ * Generated from protobuf field <code>string stop_code = 2;</code>
+ */
+ protected $stop_code = '';
+ /**
+ * The stop_name field contains the name of a stop or station.
+ *
+ * Generated from protobuf field <code>string stop_name = 3;</code>
+ */
+ protected $stop_name = '';
+ /**
+ * The stop_desc field contains a description of a stop.
+ *
+ * Generated from protobuf field <code>string stop_desc = 4;</code>
+ */
+ protected $stop_desc = '';
+ /**
+ * Degrees North, in the WGS-84 coordinate system.
+ *
+ * Generated from protobuf field <code>float latitude = 5;</code>
+ */
+ protected $latitude = 0.0;
+ /**
+ * Degrees East, in the WGS-84 coordinate system.
+ *
+ * Generated from protobuf field <code>float longitude = 6;</code>
+ */
+ protected $longitude = 0.0;
+ /**
+ * Generated from protobuf field <code>string zone_id = 7;</code>
+ */
+ protected $zone_id = '';
+ /**
+ * Generated from protobuf field <code>string stop_url = 8;</code>
+ */
+ protected $stop_url = '';
+ /**
+ * Generated from protobuf field <code>.gtfs.Stop.LocationType location_type = 9;</code>
+ */
+ protected $location_type = 0;
+ /**
+ * Generated from protobuf field <code>string parent_station = 10;</code>
+ */
+ protected $parent_station = '';
+ /**
+ * Generated from protobuf field <code>string agency_timezone = 11;</code>
+ */
+ protected $agency_timezone = '';
+ /**
+ * The exact status of the vehicle with respect to the current stop.
+ * Ignored if current_stop_sequence is missing.
+ *
+ * Generated from protobuf field <code>.gtfs.Stop.WheelchairBoarding wheelchair_boarding = 12;</code>
+ */
+ protected $wheelchair_boarding = 0;
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $stop_id
+ * The stop_id field contains an ID that uniquely identifies a stop or station.
+ * Multiple routes may use the same stop. stop_id is dataset unique.
+ * @type string $stop_code
+ * The stop_code field contains short text or a number that uniquely identifies the stop for passengers.
+ * @type string $stop_name
+ * The stop_name field contains the name of a stop or station.
+ * @type string $stop_desc
+ * The stop_desc field contains a description of a stop.
+ * @type float $latitude
+ * Degrees North, in the WGS-84 coordinate system.
+ * @type float $longitude
+ * Degrees East, in the WGS-84 coordinate system.
+ * @type string $zone_id
+ * @type string $stop_url
+ * @type int $location_type
+ * @type string $parent_station
+ * @type string $agency_timezone
+ * @type int $wheelchair_boarding
+ * The exact status of the vehicle with respect to the current stop.
+ * Ignored if current_stop_sequence is missing.
+ * @type \Google\Protobuf\Any $extension
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The stop_id field contains an ID that uniquely identifies a stop or station.
+ * Multiple routes may use the same stop. stop_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string stop_id = 1;</code>
+ * @return string
+ */
+ public function getStopId()
+ {
+ return $this->stop_id;
+ }
+
+ /**
+ * The stop_id field contains an ID that uniquely identifies a stop or station.
+ * Multiple routes may use the same stop. stop_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string stop_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStopId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->stop_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The stop_code field contains short text or a number that uniquely identifies the stop for passengers.
+ *
+ * Generated from protobuf field <code>string stop_code = 2;</code>
+ * @return string
+ */
+ public function getStopCode()
+ {
+ return $this->stop_code;
+ }
+
+ /**
+ * The stop_code field contains short text or a number that uniquely identifies the stop for passengers.
+ *
+ * Generated from protobuf field <code>string stop_code = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStopCode($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->stop_code = $var;
+
+ return $this;
+ }
+
+ /**
+ * The stop_name field contains the name of a stop or station.
+ *
+ * Generated from protobuf field <code>string stop_name = 3;</code>
+ * @return string
+ */
+ public function getStopName()
+ {
+ return $this->stop_name;
+ }
+
+ /**
+ * The stop_name field contains the name of a stop or station.
+ *
+ * Generated from protobuf field <code>string stop_name = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStopName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->stop_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The stop_desc field contains a description of a stop.
+ *
+ * Generated from protobuf field <code>string stop_desc = 4;</code>
+ * @return string
+ */
+ public function getStopDesc()
+ {
+ return $this->stop_desc;
+ }
+
+ /**
+ * The stop_desc field contains a description of a stop.
+ *
+ * Generated from protobuf field <code>string stop_desc = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStopDesc($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->stop_desc = $var;
+
+ return $this;
+ }
+
+ /**
+ * Degrees North, in the WGS-84 coordinate system.
+ *
+ * Generated from protobuf field <code>float latitude = 5;</code>
+ * @return float
+ */
+ public function getLatitude()
+ {
+ return $this->latitude;
+ }
+
+ /**
+ * Degrees North, in the WGS-84 coordinate system.
+ *
+ * Generated from protobuf field <code>float latitude = 5;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setLatitude($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->latitude = $var;
+
+ return $this;
+ }
+
+ /**
+ * Degrees East, in the WGS-84 coordinate system.
+ *
+ * Generated from protobuf field <code>float longitude = 6;</code>
+ * @return float
+ */
+ public function getLongitude()
+ {
+ return $this->longitude;
+ }
+
+ /**
+ * Degrees East, in the WGS-84 coordinate system.
+ *
+ * Generated from protobuf field <code>float longitude = 6;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setLongitude($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->longitude = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string zone_id = 7;</code>
+ * @return string
+ */
+ public function getZoneId()
+ {
+ return $this->zone_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>string zone_id = 7;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setZoneId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->zone_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string stop_url = 8;</code>
+ * @return string
+ */
+ public function getStopUrl()
+ {
+ return $this->stop_url;
+ }
+
+ /**
+ * Generated from protobuf field <code>string stop_url = 8;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStopUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->stop_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Stop.LocationType location_type = 9;</code>
+ * @return int
+ */
+ public function getLocationType()
+ {
+ return $this->location_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Stop.LocationType location_type = 9;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setLocationType($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Stop_LocationType::class);
+ $this->location_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string parent_station = 10;</code>
+ * @return string
+ */
+ public function getParentStation()
+ {
+ return $this->parent_station;
+ }
+
+ /**
+ * Generated from protobuf field <code>string parent_station = 10;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setParentStation($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->parent_station = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string agency_timezone = 11;</code>
+ * @return string
+ */
+ public function getAgencyTimezone()
+ {
+ return $this->agency_timezone;
+ }
+
+ /**
+ * Generated from protobuf field <code>string agency_timezone = 11;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setAgencyTimezone($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->agency_timezone = $var;
+
+ return $this;
+ }
+
+ /**
+ * The exact status of the vehicle with respect to the current stop.
+ * Ignored if current_stop_sequence is missing.
+ *
+ * Generated from protobuf field <code>.gtfs.Stop.WheelchairBoarding wheelchair_boarding = 12;</code>
+ * @return int
+ */
+ public function getWheelchairBoarding()
+ {
+ return $this->wheelchair_boarding;
+ }
+
+ /**
+ * The exact status of the vehicle with respect to the current stop.
+ * Ignored if current_stop_sequence is missing.
+ *
+ * Generated from protobuf field <code>.gtfs.Stop.WheelchairBoarding wheelchair_boarding = 12;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setWheelchairBoarding($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Stop_WheelchairBoarding::class);
+ $this->wheelchair_boarding = $var;
+
+ return $this;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/Stop/LocationType.php b/inc/Gtfs/Stop/LocationType.php
new file mode 100644
index 0000000..204d537
--- /dev/null
+++ b/inc/Gtfs/Stop/LocationType.php
@@ -0,0 +1,76 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs\Stop;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>gtfs.Stop.LocationType</code>
+ */
+class LocationType
+{
+ /**
+ * Stop (or Platform). A location where passengers board or disembark from a transit vehicle. Is called a platform when defined within a parent_station.
+ *
+ * Generated from protobuf enum <code>STOP = 0;</code>
+ */
+ const STOP = 0;
+ /**
+ * Station. A physical structure or area that contains one or more platform.
+ *
+ * Generated from protobuf enum <code>STATION = 1;</code>
+ */
+ const STATION = 1;
+ /**
+ * Entrance/Exit. A location where passengers can enter or exit a station from the street. If an entrance/exit belongs to multiple stations, it can be linked by pathways to both, but the data provider must pick one of them as parent.
+ *
+ * Generated from protobuf enum <code>ENTRANCE = 2;</code>
+ */
+ const ENTRANCE = 2;
+ /**
+ * Generic Node. A location within a station, not matching any other location_type, which can be used to link together pathways define in pathways.txt.
+ *
+ * Generated from protobuf enum <code>GENERIC_NODE = 3;</code>
+ */
+ const GENERIC_NODE = 3;
+ /**
+ * Boarding Area. A specific location on a platform, where passengers can board and/or alight vehicles.
+ *
+ * Generated from protobuf enum <code>BOARDING_AREA = 4;</code>
+ */
+ const BOARDING_AREA = 4;
+
+ private static $valueToName = [
+ self::STOP => 'STOP',
+ self::STATION => 'STATION',
+ self::ENTRANCE => 'ENTRANCE',
+ self::GENERIC_NODE => 'GENERIC_NODE',
+ self::BOARDING_AREA => 'BOARDING_AREA',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(LocationType::class, \Gtfs\Stop_LocationType::class);
+
diff --git a/inc/Gtfs/Stop/WheelchairBoarding.php b/inc/Gtfs/Stop/WheelchairBoarding.php
new file mode 100644
index 0000000..460a6dc
--- /dev/null
+++ b/inc/Gtfs/Stop/WheelchairBoarding.php
@@ -0,0 +1,62 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs\Stop;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>gtfs.Stop.WheelchairBoarding</code>
+ */
+class WheelchairBoarding
+{
+ /**
+ * no accessibility information for the stop
+ *
+ * Generated from protobuf enum <code>UNKNOWN = 0;</code>
+ */
+ const UNKNOWN = 0;
+ /**
+ * some vehicles at this stop can be boarded by a rider in a wheelchair
+ *
+ * Generated from protobuf enum <code>ACCESSIBLE = 1;</code>
+ */
+ const ACCESSIBLE = 1;
+ /**
+ * wheelchair boarding is not possible at this stop
+ *
+ * Generated from protobuf enum <code>NOT_ACCESSIBLE = 2;</code>
+ */
+ const NOT_ACCESSIBLE = 2;
+
+ private static $valueToName = [
+ self::UNKNOWN => 'UNKNOWN',
+ self::ACCESSIBLE => 'ACCESSIBLE',
+ self::NOT_ACCESSIBLE => 'NOT_ACCESSIBLE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(WheelchairBoarding::class, \Gtfs\Stop_WheelchairBoarding::class);
+
diff --git a/inc/Gtfs/StopTime.php b/inc/Gtfs/StopTime.php
new file mode 100644
index 0000000..c1605c9
--- /dev/null
+++ b/inc/Gtfs/StopTime.php
@@ -0,0 +1,323 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.StopTime</code>
+ */
+class StopTime extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string trip_id = 1;</code>
+ */
+ protected $trip_id = '';
+ /**
+ * Generated from protobuf field <code>string arrival_time = 2;</code>
+ */
+ protected $arrival_time = '';
+ /**
+ * Generated from protobuf field <code>string departure_time = 3;</code>
+ */
+ protected $departure_time = '';
+ /**
+ * Generated from protobuf field <code>string stop_id = 4;</code>
+ */
+ protected $stop_id = '';
+ /**
+ * Generated from protobuf field <code>string stop_sequence = 5;</code>
+ */
+ protected $stop_sequence = '';
+ /**
+ * Generated from protobuf field <code>string stop_headsign = 6;</code>
+ */
+ protected $stop_headsign = '';
+ /**
+ * Generated from protobuf field <code>.gtfs.StopTime.AvailabilityType pickup_type = 7;</code>
+ */
+ protected $pickup_type = 0;
+ /**
+ * Generated from protobuf field <code>.gtfs.StopTime.AvailabilityType drop_off_type = 8;</code>
+ */
+ protected $drop_off_type = 0;
+ /**
+ * Generated from protobuf field <code>float shape_dist_traveled = 9;</code>
+ */
+ protected $shape_dist_traveled = 0.0;
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $trip_id
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ * @type string $arrival_time
+ * @type string $departure_time
+ * @type string $stop_id
+ * @type string $stop_sequence
+ * @type string $stop_headsign
+ * @type int $pickup_type
+ * @type int $drop_off_type
+ * @type float $shape_dist_traveled
+ * @type \Google\Protobuf\Any $extension
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string trip_id = 1;</code>
+ * @return string
+ */
+ public function getTripId()
+ {
+ return $this->trip_id;
+ }
+
+ /**
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string trip_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTripId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->trip_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string arrival_time = 2;</code>
+ * @return string
+ */
+ public function getArrivalTime()
+ {
+ return $this->arrival_time;
+ }
+
+ /**
+ * Generated from protobuf field <code>string arrival_time = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setArrivalTime($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->arrival_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string departure_time = 3;</code>
+ * @return string
+ */
+ public function getDepartureTime()
+ {
+ return $this->departure_time;
+ }
+
+ /**
+ * Generated from protobuf field <code>string departure_time = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setDepartureTime($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->departure_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string stop_id = 4;</code>
+ * @return string
+ */
+ public function getStopId()
+ {
+ return $this->stop_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>string stop_id = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStopId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->stop_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string stop_sequence = 5;</code>
+ * @return string
+ */
+ public function getStopSequence()
+ {
+ return $this->stop_sequence;
+ }
+
+ /**
+ * Generated from protobuf field <code>string stop_sequence = 5;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStopSequence($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->stop_sequence = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string stop_headsign = 6;</code>
+ * @return string
+ */
+ public function getStopHeadsign()
+ {
+ return $this->stop_headsign;
+ }
+
+ /**
+ * Generated from protobuf field <code>string stop_headsign = 6;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStopHeadsign($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->stop_headsign = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.StopTime.AvailabilityType pickup_type = 7;</code>
+ * @return int
+ */
+ public function getPickupType()
+ {
+ return $this->pickup_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.StopTime.AvailabilityType pickup_type = 7;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setPickupType($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\StopTime_AvailabilityType::class);
+ $this->pickup_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.StopTime.AvailabilityType drop_off_type = 8;</code>
+ * @return int
+ */
+ public function getDropOffType()
+ {
+ return $this->drop_off_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.StopTime.AvailabilityType drop_off_type = 8;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDropOffType($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\StopTime_AvailabilityType::class);
+ $this->drop_off_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>float shape_dist_traveled = 9;</code>
+ * @return float
+ */
+ public function getShapeDistTraveled()
+ {
+ return $this->shape_dist_traveled;
+ }
+
+ /**
+ * Generated from protobuf field <code>float shape_dist_traveled = 9;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setShapeDistTraveled($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->shape_dist_traveled = $var;
+
+ return $this;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/StopTime/AvailabilityType.php b/inc/Gtfs/StopTime/AvailabilityType.php
new file mode 100644
index 0000000..6f876cc
--- /dev/null
+++ b/inc/Gtfs/StopTime/AvailabilityType.php
@@ -0,0 +1,69 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs\StopTime;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>gtfs.StopTime.AvailabilityType</code>
+ */
+class AvailabilityType
+{
+ /**
+ * Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area.
+ *
+ * Generated from protobuf enum <code>REGULAR = 0;</code>
+ */
+ const REGULAR = 0;
+ /**
+ * Subway, Metro. Any underground rail system within a metropolitan area.
+ *
+ * Generated from protobuf enum <code>NOT_AVAILABLE = 1;</code>
+ */
+ const NOT_AVAILABLE = 1;
+ /**
+ * Rail. Used for intercity or long-distance travel.
+ *
+ * Generated from protobuf enum <code>PHONE = 2;</code>
+ */
+ const PHONE = 2;
+ /**
+ * Bus. Used for short- and long-distance bus routes.
+ *
+ * Generated from protobuf enum <code>DRIVER = 3;</code>
+ */
+ const DRIVER = 3;
+
+ private static $valueToName = [
+ self::REGULAR => 'REGULAR',
+ self::NOT_AVAILABLE => 'NOT_AVAILABLE',
+ self::PHONE => 'PHONE',
+ self::DRIVER => 'DRIVER',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(AvailabilityType::class, \Gtfs\StopTime_AvailabilityType::class);
+
diff --git a/inc/Gtfs/StopTime_AvailabilityType.php b/inc/Gtfs/StopTime_AvailabilityType.php
new file mode 100644
index 0000000..73c70ed
--- /dev/null
+++ b/inc/Gtfs/StopTime_AvailabilityType.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Gtfs\StopTime\AvailabilityType instead.
+ * @deprecated
+ */
+ class StopTime_AvailabilityType {}
+}
+class_exists(StopTime\AvailabilityType::class);
+@trigger_error('Gtfs\StopTime_AvailabilityType is deprecated and will be removed in the next major release. Use Gtfs\StopTime\AvailabilityType instead', E_USER_DEPRECATED);
+
diff --git a/inc/Gtfs/Stop_LocationType.php b/inc/Gtfs/Stop_LocationType.php
new file mode 100644
index 0000000..18cfb9e
--- /dev/null
+++ b/inc/Gtfs/Stop_LocationType.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Gtfs\Stop\LocationType instead.
+ * @deprecated
+ */
+ class Stop_LocationType {}
+}
+class_exists(Stop\LocationType::class);
+@trigger_error('Gtfs\Stop_LocationType is deprecated and will be removed in the next major release. Use Gtfs\Stop\LocationType instead', E_USER_DEPRECATED);
+
diff --git a/inc/Gtfs/Stop_WheelchairBoarding.php b/inc/Gtfs/Stop_WheelchairBoarding.php
new file mode 100644
index 0000000..1fbb1a9
--- /dev/null
+++ b/inc/Gtfs/Stop_WheelchairBoarding.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Gtfs\Stop\WheelchairBoarding instead.
+ * @deprecated
+ */
+ class Stop_WheelchairBoarding {}
+}
+class_exists(Stop\WheelchairBoarding::class);
+@trigger_error('Gtfs\Stop_WheelchairBoarding is deprecated and will be removed in the next major release. Use Gtfs\Stop\WheelchairBoarding instead', E_USER_DEPRECATED);
+
diff --git a/inc/Gtfs/Transfer.php b/inc/Gtfs/Transfer.php
new file mode 100644
index 0000000..c3ee43b
--- /dev/null
+++ b/inc/Gtfs/Transfer.php
@@ -0,0 +1,181 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.Transfer</code>
+ */
+class Transfer extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>string from_stop_id = 1;</code>
+ */
+ protected $from_stop_id = '';
+ /**
+ * Generated from protobuf field <code>string to_stop_id = 2;</code>
+ */
+ protected $to_stop_id = '';
+ /**
+ * Generated from protobuf field <code>.gtfs.Transfer.TransferType transfer_type = 3;</code>
+ */
+ protected $transfer_type = 0;
+ /**
+ * Generated from protobuf field <code>int32 min_transfer_time = 4;</code>
+ */
+ protected $min_transfer_time = 0;
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $from_stop_id
+ * @type string $to_stop_id
+ * @type int $transfer_type
+ * @type int $min_transfer_time
+ * @type \Google\Protobuf\Any $extension
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>string from_stop_id = 1;</code>
+ * @return string
+ */
+ public function getFromStopId()
+ {
+ return $this->from_stop_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>string from_stop_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setFromStopId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->from_stop_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string to_stop_id = 2;</code>
+ * @return string
+ */
+ public function getToStopId()
+ {
+ return $this->to_stop_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>string to_stop_id = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setToStopId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->to_stop_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Transfer.TransferType transfer_type = 3;</code>
+ * @return int
+ */
+ public function getTransferType()
+ {
+ return $this->transfer_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Transfer.TransferType transfer_type = 3;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setTransferType($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Transfer_TransferType::class);
+ $this->transfer_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>int32 min_transfer_time = 4;</code>
+ * @return int
+ */
+ public function getMinTransferTime()
+ {
+ return $this->min_transfer_time;
+ }
+
+ /**
+ * Generated from protobuf field <code>int32 min_transfer_time = 4;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setMinTransferTime($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->min_transfer_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/Transfer/TransferType.php b/inc/Gtfs/Transfer/TransferType.php
new file mode 100644
index 0000000..f78300f
--- /dev/null
+++ b/inc/Gtfs/Transfer/TransferType.php
@@ -0,0 +1,61 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs\Transfer;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>gtfs.Transfer.TransferType</code>
+ */
+class TransferType
+{
+ /**
+ * Generated from protobuf enum <code>RECOMMENDED = 0;</code>
+ */
+ const RECOMMENDED = 0;
+ /**
+ * Generated from protobuf enum <code>TIMED = 1;</code>
+ */
+ const TIMED = 1;
+ /**
+ * Generated from protobuf enum <code>MINIMUM = 2;</code>
+ */
+ const MINIMUM = 2;
+ /**
+ * Generated from protobuf enum <code>NOT_POSSIBLE = 3;</code>
+ */
+ const NOT_POSSIBLE = 3;
+
+ private static $valueToName = [
+ self::RECOMMENDED => 'RECOMMENDED',
+ self::TIMED => 'TIMED',
+ self::MINIMUM => 'MINIMUM',
+ self::NOT_POSSIBLE => 'NOT_POSSIBLE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(TransferType::class, \Gtfs\Transfer_TransferType::class);
+
diff --git a/inc/Gtfs/Transfer_TransferType.php b/inc/Gtfs/Transfer_TransferType.php
new file mode 100644
index 0000000..8efb526
--- /dev/null
+++ b/inc/Gtfs/Transfer_TransferType.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Gtfs\Transfer\TransferType instead.
+ * @deprecated
+ */
+ class Transfer_TransferType {}
+}
+class_exists(Transfer\TransferType::class);
+@trigger_error('Gtfs\Transfer_TransferType is deprecated and will be removed in the next major release. Use Gtfs\Transfer\TransferType instead', E_USER_DEPRECATED);
+
diff --git a/inc/Gtfs/Trip.php b/inc/Gtfs/Trip.php
new file mode 100644
index 0000000..0452c4f
--- /dev/null
+++ b/inc/Gtfs/Trip.php
@@ -0,0 +1,346 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>gtfs.Trip</code>
+ */
+class Trip extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The route_id field contains an ID that uniquely identifies a route.
+ *
+ * Generated from protobuf field <code>string route_id = 1;</code>
+ */
+ protected $route_id = '';
+ /**
+ * The service_id contains an ID that uniquely identifies a set of dates when service is available for one or more routes.
+ *
+ * Generated from protobuf field <code>string service_id = 2;</code>
+ */
+ protected $service_id = '';
+ /**
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string trip_id = 3;</code>
+ */
+ protected $trip_id = '';
+ /**
+ * The trip_headsign field contains the text that appears on a sign that identifies the trip's destination to passengers.
+ *
+ * Generated from protobuf field <code>string trip_headsign = 4;</code>
+ */
+ protected $trip_headsign = '';
+ /**
+ * The trip_short_name field contains the text that appears in schedules and sign boards to identify the trip to passengers.
+ *
+ * Generated from protobuf field <code>string trip_short_name = 5;</code>
+ */
+ protected $trip_short_name = '';
+ /**
+ * Generated from protobuf field <code>.gtfs.Trip.Direction direction_id = 6;</code>
+ */
+ protected $direction_id = 0;
+ /**
+ * The block_id field identifies the block to which the trip belongs.
+ * A block consists of two or more sequential trips made using the same vehicle,
+ * where a passenger can transfer from one trip to the next just by staying in the vehicle.
+ *
+ * Generated from protobuf field <code>string block_id = 7;</code>
+ */
+ protected $block_id = '';
+ /**
+ * The shape_id field contains an ID that defines a shape for the trip.
+ *
+ * Generated from protobuf field <code>string shape_id = 8;</code>
+ */
+ protected $shape_id = '';
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ */
+ protected $extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $route_id
+ * The route_id field contains an ID that uniquely identifies a route.
+ * @type string $service_id
+ * The service_id contains an ID that uniquely identifies a set of dates when service is available for one or more routes.
+ * @type string $trip_id
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ * @type string $trip_headsign
+ * The trip_headsign field contains the text that appears on a sign that identifies the trip's destination to passengers.
+ * @type string $trip_short_name
+ * The trip_short_name field contains the text that appears in schedules and sign boards to identify the trip to passengers.
+ * @type int $direction_id
+ * @type string $block_id
+ * The block_id field identifies the block to which the trip belongs.
+ * A block consists of two or more sequential trips made using the same vehicle,
+ * where a passenger can transfer from one trip to the next just by staying in the vehicle.
+ * @type string $shape_id
+ * The shape_id field contains an ID that defines a shape for the trip.
+ * @type \Google\Protobuf\Any $extension
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Proto\Gtfs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The route_id field contains an ID that uniquely identifies a route.
+ *
+ * Generated from protobuf field <code>string route_id = 1;</code>
+ * @return string
+ */
+ public function getRouteId()
+ {
+ return $this->route_id;
+ }
+
+ /**
+ * The route_id field contains an ID that uniquely identifies a route.
+ *
+ * Generated from protobuf field <code>string route_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setRouteId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->route_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The service_id contains an ID that uniquely identifies a set of dates when service is available for one or more routes.
+ *
+ * Generated from protobuf field <code>string service_id = 2;</code>
+ * @return string
+ */
+ public function getServiceId()
+ {
+ return $this->service_id;
+ }
+
+ /**
+ * The service_id contains an ID that uniquely identifies a set of dates when service is available for one or more routes.
+ *
+ * Generated from protobuf field <code>string service_id = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setServiceId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string trip_id = 3;</code>
+ * @return string
+ */
+ public function getTripId()
+ {
+ return $this->trip_id;
+ }
+
+ /**
+ * The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ *
+ * Generated from protobuf field <code>string trip_id = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTripId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->trip_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The trip_headsign field contains the text that appears on a sign that identifies the trip's destination to passengers.
+ *
+ * Generated from protobuf field <code>string trip_headsign = 4;</code>
+ * @return string
+ */
+ public function getTripHeadsign()
+ {
+ return $this->trip_headsign;
+ }
+
+ /**
+ * The trip_headsign field contains the text that appears on a sign that identifies the trip's destination to passengers.
+ *
+ * Generated from protobuf field <code>string trip_headsign = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTripHeadsign($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->trip_headsign = $var;
+
+ return $this;
+ }
+
+ /**
+ * The trip_short_name field contains the text that appears in schedules and sign boards to identify the trip to passengers.
+ *
+ * Generated from protobuf field <code>string trip_short_name = 5;</code>
+ * @return string
+ */
+ public function getTripShortName()
+ {
+ return $this->trip_short_name;
+ }
+
+ /**
+ * The trip_short_name field contains the text that appears in schedules and sign boards to identify the trip to passengers.
+ *
+ * Generated from protobuf field <code>string trip_short_name = 5;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTripShortName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->trip_short_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Trip.Direction direction_id = 6;</code>
+ * @return int
+ */
+ public function getDirectionId()
+ {
+ return $this->direction_id;
+ }
+
+ /**
+ * Generated from protobuf field <code>.gtfs.Trip.Direction direction_id = 6;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDirectionId($var)
+ {
+ GPBUtil::checkEnum($var, \Gtfs\Trip_Direction::class);
+ $this->direction_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The block_id field identifies the block to which the trip belongs.
+ * A block consists of two or more sequential trips made using the same vehicle,
+ * where a passenger can transfer from one trip to the next just by staying in the vehicle.
+ *
+ * Generated from protobuf field <code>string block_id = 7;</code>
+ * @return string
+ */
+ public function getBlockId()
+ {
+ return $this->block_id;
+ }
+
+ /**
+ * The block_id field identifies the block to which the trip belongs.
+ * A block consists of two or more sequential trips made using the same vehicle,
+ * where a passenger can transfer from one trip to the next just by staying in the vehicle.
+ *
+ * Generated from protobuf field <code>string block_id = 7;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setBlockId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->block_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The shape_id field contains an ID that defines a shape for the trip.
+ *
+ * Generated from protobuf field <code>string shape_id = 8;</code>
+ * @return string
+ */
+ public function getShapeId()
+ {
+ return $this->shape_id;
+ }
+
+ /**
+ * The shape_id field contains an ID that defines a shape for the trip.
+ *
+ * Generated from protobuf field <code>string shape_id = 8;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setShapeId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->shape_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @return \Google\Protobuf\Any
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The extensions namespace allows 3rd-party developers to extend the
+ * GTFS specification in order to add and evaluate new features and
+ * modifications to the spec.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/inc/Gtfs/Trip/Direction.php b/inc/Gtfs/Trip/Direction.php
new file mode 100644
index 0000000..d446b74
--- /dev/null
+++ b/inc/Gtfs/Trip/Direction.php
@@ -0,0 +1,53 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs\Trip;
+
+use UnexpectedValueException;
+
+/**
+ * The direction_id field contains a binary value that indicates the direction of travel for a trip.
+ *
+ * Protobuf type <code>gtfs.Trip.Direction</code>
+ */
+class Direction
+{
+ /**
+ * Generated from protobuf enum <code>OUTBOUND = 0;</code>
+ */
+ const OUTBOUND = 0;
+ /**
+ * Generated from protobuf enum <code>INBOUND = 1;</code>
+ */
+ const INBOUND = 1;
+
+ private static $valueToName = [
+ self::OUTBOUND => 'OUTBOUND',
+ self::INBOUND => 'INBOUND',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Direction::class, \Gtfs\Trip_Direction::class);
+
diff --git a/inc/Gtfs/Trip_Direction.php b/inc/Gtfs/Trip_Direction.php
new file mode 100644
index 0000000..b626b3c
--- /dev/null
+++ b/inc/Gtfs/Trip_Direction.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: proto/gtfs.proto
+
+namespace Gtfs;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Gtfs\Trip\Direction instead.
+ * @deprecated
+ */
+ class Trip_Direction {}
+}
+class_exists(Trip\Direction::class);
+@trigger_error('Gtfs\Trip_Direction is deprecated and will be removed in the next major release. Use Gtfs\Trip\Direction instead', E_USER_DEPRECATED);
+
diff --git a/inc/api.php b/inc/api.php
new file mode 100644
index 0000000..fd9b40f
--- /dev/null
+++ b/inc/api.php
@@ -0,0 +1,106 @@
+<?php
+class api {
+ private function writeJSON($array) {
+ echo json_encode($array);
+ }
+
+ private function error($error = null) {
+ self::writeJSON(["status" => "error", "error" => $error]);
+ exit();
+ }
+
+ private function returnData($data) {
+ self::writeJSON(["status" => "ok", "data" => $data]);
+ exit();
+ }
+
+ private function transformRouteShortName($name) {
+ if ($name == "L9N") return "L9";
+ if ($name == "L10N") return "L10";
+ return $name;
+ }
+
+ public static function handleRequest() {
+ global $_GET, $_POST, $conf;
+
+ header("Content-Type: application/json");
+
+ if (!isset($_GET["action"])) self::error("actionNotProvided");
+
+ $gtfs = new gtfs();
+
+ switch ($_GET["action"]) {
+ case "routes":
+ self::returnData($gtfs->getRoutes());
+ break;
+
+ case "trips":
+ if (!isset($_GET["route"])) self::error("missingArguments");
+ $route = $_GET["route"];
+
+ self::returnData($gtfs->getTrips($route));
+ break;
+
+ case "stations":
+ self::returnData($gtfs->getStations(true));
+
+ /*$estacionsFull = tmbApi::request("transit/linies/metro/".$linia."/estacions");
+ if ($estacionsFull === false || !isset($estacionsFull["features"])) self::error("unexpected");
+
+ $estacions = [];
+ foreach ($estacionsFull["features"] as $estacio) {
+ if (!isset($estacio["properties"])) self::error("unexpected");
+ $estacions[] = [
+ "id" => $estacio["properties"]["CODI_ESTACIO"] ?? null,
+ "nom" => $estacio["properties"]["NOM_ESTACIO"] ?? "",
+ "color" => $estacio["properties"]["COLOR_LINIA"] ?? "000",
+ "ordre" => $estacio["properties"]["ORDRE_ESTACIO"] ?? 0
+ ];
+ }
+
+ usort($estacions, function ($a, $b) {
+ return $a["ordre"] - $b["ordre"];
+ });*/
+ break;
+
+ case "getTimes":
+ if (!isset($_GET["stop"])) self::error("missingArguments");
+
+ $stop = $gtfs->getStop($_GET["stop"]);
+ $times = $gtfs->getStopTimes($_GET["stop"]);
+
+ $schedules = [];
+ $routes = [];
+ foreach ($times as $time) {
+ if ($time["trip_headsign"] == $stop["stop_name"]) continue;
+ $schedules[] = [
+ "destination" => $time["trip_headsign"],
+ "arrivalTime" => gtfs::time2seconds($time["arrival_time"]),
+ "departureTime" => gtfs::time2seconds($time["departure_time"]),
+ "route" => self::transformRouteShortName($time["route_short_name"]),
+ "color" => $time["route_color"],
+ "textColor" => $time["route_text_color"]
+ ];
+
+ if (!in_array($time["route_short_name"], $routes)) $routes[] = $time["route_short_name"];
+ }
+
+ $timeSinceMidnight = gtfs::timeSinceMidnight();
+
+ usort($schedules, function($a, $b) use ($timeSinceMidnight) {
+ return ($a["departureTime"] - $b["departureTime"]) % (24*60*60);
+ });
+
+ $data = [
+ "schedules" => $schedules,
+ "numRoutes" => count($routes)
+ ];
+
+ self::returnData($data);
+ break;
+
+ default:
+ self::error("actionNotImplemented");
+ }
+ }
+}
diff --git a/inc/csv.php b/inc/csv.php
new file mode 100644
index 0000000..d974713
--- /dev/null
+++ b/inc/csv.php
@@ -0,0 +1,29 @@
+<?php
+class csv {
+ public static $fields = ["dni", "name", "category", "email", "companies"];
+
+ public static function csv2array($file, $check = null, $onlyField = null) {
+ $return = [];
+
+ $flag = true;
+ $headers = [];
+ while (($line = fgetcsv($file, null, ",")) !== false) {
+ if ($flag) {
+ $headers = $line;
+ $flag = false;
+ } else {
+ $item = [];
+
+ foreach ($headers as $j => $field) {
+ $item[$field] = trim($line[$j]);
+ }
+
+ if ($check === null || $check($item)) $return[] = ($onlyField === null ? $item : ($item[$onlyField] ?? null));
+ }
+ }
+
+ fclose($file);
+
+ return $return;
+ }
+}
diff --git a/inc/gtfs.php b/inc/gtfs.php
new file mode 100644
index 0000000..b4c49da
--- /dev/null
+++ b/inc/gtfs.php
@@ -0,0 +1,190 @@
+<?php
+class gtfs {
+ //private static $files = ["calendar_dates", "calendar", "routes", "stop_times", "stops", "trips"];
+
+ private $db;
+
+ private static $dow = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
+
+ function __construct($path = null) {
+ global $conf;
+
+ try {
+ $this->db = new PDO('sqlite:'.($conf["databaseFile"]));
+ } catch (PDOException $e) {
+ die("SQLite error: $e\n");
+ }
+ }
+
+ static function timeSinceMidnight() {
+ //return 8*60*60 + 9*60; //TESTING
+ return (time() - mktime(0, 0, 0));
+ }
+
+ static function today() {
+ return date("Ymd");
+ }
+
+ static function time2seconds($time) {
+ $timeSinceMidnight = self::timeSinceMidnight();
+
+ $boom = explode(":", $time);
+ if (count($boom) != 3) return null;
+
+ return ((($boom[0]*60) + $boom[1])*60 + $boom[2]) % (24*60*60);
+ }
+
+ private function fetchAll($sql) {
+ $query = $this->db->query($sql);
+ if (!$query) return false;
+
+ return $query->fetchAll(PDO::FETCH_ASSOC);
+ }
+
+ private function fetchAllPrepared($sql, $values) {
+ $query = $this->db->prepare($sql);
+ if (!$query) return false;
+
+ $query->execute($values);
+ return $query->fetchAll(PDO::FETCH_ASSOC);
+ }
+
+ private function fetchTable($table, $filters = [], $orderedField = null) {
+ $order = ($orderedField === null ? "" : " ORDER BY $orderedField");
+
+ if (!count($filters)) {
+ return $this->fetchAll("SELECT * FROM $table".$order);
+ }
+
+ $whereConditions = [];
+ $values = [];
+ foreach ($filters as $filter) {
+ $whereConditions[] = $filter[0]." = ?";
+ $values[] = $filter[1];
+ }
+
+ return $this->fetchAllPrepared("SELECT * FROM $table WHERE ".implode(" AND ", $whereConditions).$order, $values);
+ }
+
+ function getRoutes() {
+ return $this->fetchTable("routes");
+ }
+
+ function getTrips($route) {
+ return $this->fetchTable("trips", [["route_id", $route]]);
+ }
+
+ function getStations($ordered = false) {
+ return $this->fetchTable("stops", [["location_type", Gtfs\Stop\LocationType::STATION]], ($ordered ? "stop_name" : null));
+ }
+
+ function getStop($stop) {
+ $results = $this->fetchTable("stops", [["stop_id", $stop]]);
+
+ if (!count($results)) return null;
+
+ return $results[0];
+ }
+
+ function getPlatforms($stop) {
+ $results = $this->fetchTable("stops", [["parent_station", $stop], ["location_type", Gtfs\Stop\LocationType::STOP]], "stop_id");
+
+ return $results;
+ }
+
+ const TIME_LIMIT = 160;
+ function getStopTimes($stop, $timeLimit = self::TIME_LIMIT) {
+ $stops = $this->getPlatforms($stop);
+
+ $values = [];
+ foreach ($stops as $s) {
+ $values[] = $s["stop_id"]; // Stops
+ }
+
+ $rdow = (int)date("w");
+ $dow = self::$dow[$rdow]; // Today's day of week
+ $dow2 = self::$dow[($rdow + 1) % 7]; // Tomorrow's day of week
+
+ if (!count($stops)) return [];
+
+ $sql = "SELECT st.*, t.*, r.*, c.*, cd.*, strftime('%Y%m%d', 'now', 'localtime') as today, strftime('%Y%m%d', 'now', 'localtime', '1 day') as tomorrow, time('now', 'localtime') as now
+ FROM stop_times st
+ INNER JOIN trips t
+ ON st.trip_id = t.trip_id
+ INNER JOIN routes r
+ ON t.route_id = r.route_id
+ LEFT JOIN calendar c
+ ON t.service_id = c.service_id
+ LEFT JOIN calendar_dates cd
+ ON t.service_id = cd.service_id
+ WHERE
+ st.stop_id IN (".implode(", ", array_fill(0, count($stops), "?")).") AND
+ (
+ cd.service_id IS NULL OR
+ cd.exception_type = ".(int)Gtfs\CalendarDate\ExceptionType::ADDED."
+ ) AND
+ (
+ (
+ (
+ (
+ time(now) < time('00:00:00', '-".(int)$timeLimit." minutes') AND
+ st.departure_time BETWEEN time(now) AND time(now, '".(int)$timeLimit." minutes')
+ ) OR
+ (
+ time(now) >= time('00:00:00', '-".(int)$timeLimit." minutes') AND
+ st.departure_time BETWEEN time(now) AND strftime('24:%M:%S', now, '".(int)$timeLimit." minutes')
+ )
+ ) AND
+ (
+ c.service_id IS NULL OR
+ (
+ c.start_date <= today AND
+ c.end_date >= today AND
+ c.$dow = ".(int)Gtfs\Calendar\CalendarDay::AVAILABLE."
+ )
+ ) AND
+ (
+ cd.service_id IS NULL OR
+ cd.date = today
+ )
+ ) OR
+ (
+ (
+ (
+ time(now) < time('00:00:00', '-".(int)$timeLimit." minutes') AND
+ st.departure_time BETWEEN ((strftime('%H', now) + 24) || strftime(':%M:%S', now)) AND ((strftime('%H', now, '".(int)$timeLimit." minutes') + 24) || strftime(':%M:%S', now, '".(int)$timeLimit." minutes'))
+ ) OR
+ (
+ time(now) >= time('00:00:00', '-".(int)$timeLimit." minutes') AND
+ st.departure_time BETWEEN time(now) AND strftime('24:%M:%S', now, '".(int)$timeLimit." minutes')
+ )
+ ) AND
+ (
+ c.service_id IS NULL OR
+ (
+ c.start_date <= tomorrow AND
+ c.end_date >= tomorrow AND
+ c.$dow2 = ".(int)Gtfs\Calendar\CalendarDay::AVAILABLE."
+ )
+ ) AND
+ (
+ cd.service_id IS NULL OR
+ cd.date = tomorrow
+ )
+ )
+ )
+ ORDER BY departure_time ASC";
+
+ $result = $this->fetchAllPrepared($sql, $values);
+ if ($result === false) {
+ echo implode("\n", $this->db->errorInfo());
+ exit();
+ }
+
+ return $result;
+ }
+
+ function __destruct() {
+ $this->db = null;
+ }
+}
diff --git a/inc/gtfsHandler.php b/inc/gtfsHandler.php
new file mode 100644
index 0000000..a6d8aa1
--- /dev/null
+++ b/inc/gtfsHandler.php
@@ -0,0 +1,321 @@
+<?php
+class gtfsHandler {
+ public static $databases = [
+ "agency" => [
+ "columns" => [
+ "agency_id" => "TEXT",
+ "agency_name" => "TEXT NOT NULL",
+ "agency_url" => "TEXT NOT NULL",
+ "agency_timezone" => "TEXT NOT NULL",
+ "agency_lang" => "TEXT",
+ "agency_phone" => "TEXT",
+ "agency_fare_url" => "TEXT",
+ "agency_email" => "TEXT"
+ ]
+ ],
+ "attributions" => [
+ "columns" => [
+ "attribution_id" => "TEXT PRIMARY KEY",
+ "agency_id" => "TEXT",
+ "route_id" => "TEXT",
+ "trip_id" => "TEXT",
+ "organization_name" => "TEXT NOT NULL",
+ "is_producer" => "INT",
+ "is_operator" => "INT",
+ "is_authority" => "INT",
+ "attribution_url" => "TEXT",
+ "attribution_email" => "TEXT",
+ "attribution_phone" => "TEXT"
+ ]
+ ],
+ "stops" => [
+ "columns" => [
+ "stop_id" => "TEXT PRIMARY KEY",
+ "stop_code" => "TEXT",
+ "stop_name" => "TEXT",
+ "stop_desc" => "TEXT",
+ "stop_lat" => "TEXT",
+ "stop_lon" => "TEXT",
+ "zone_id" => "TEXT",
+ "stop_url" => "TEXT",
+ "location_type" => "INT",
+ "parent_station" => "TEXT",
+ "stop_timezone" => "TEXT",
+ "wheelchair_boarding" => "INT",
+ "level_id" => "TEXT",
+ "platform_code" => "TEXT"
+ ],
+ "indexes" => ["parent_station"]
+ ],
+ "routes" => [
+ "columns" => [
+ "route_id" => "TEXT PRIMARY KEY",
+ "agency_id" => "TEXT",
+ "route_short_name" => "TEXT",
+ "route_long_name" => "TEXT",
+ "route_desc" => "TEXT",
+ "route_type" => "INT NOT NULL",
+ "route_url" => "TEXT",
+ "route_color" => "TEXT",
+ "route_text_color" => "TEXT",
+ "route_sort_order" => "INT"
+ ]
+ ],
+ "trips" => [
+ "columns" => [
+ "route_id" => "TEXT NOT NULL",
+ "service_id" => "TEXT NOT NULL",
+ "trip_id" => "TEXT PRIMARY KEY",
+ "trip_headsign" => "TEXT",
+ "trip_short_name" => "TEXT",
+ "direction_id" => "INT",
+ "block_id" => "TEXT",
+ "shape_id" => "TEXT",
+ "wheelchair_accessible" => "INT",
+ "bikes_allowed" => "INT"
+ ],
+ "indexes" => ["route_id", "service_id"]
+ ],
+ "stop_times" => [
+ "columns" => [
+ "trip_id" => "TEXT NOT NULL",
+ "arrival_time" => "TEXT",
+ "departure_time" => "TEXT",
+ "stop_id" => "TEXT NOT NULL",
+ "stop_sequence" => "INT NOT NULL",
+ "stop_headsign" => "TEXT",
+ "pickup_type" => "INT",
+ "drop_off_type" => "INT",
+ "shape_dist_traveled" => "INT",
+ "timepoint" => "INT"
+ ],
+ "indexes" => ["trip_id", "stop_id"],
+ "times" => ["arrival_time", "departure_time"]
+ ],
+ "calendar" => [
+ "columns" => [
+ "service_id" => "TEXT PRIMARY KEY",
+ "monday" => "INT NOT NULL",
+ "tuesday" => "INT NOT NULL",
+ "wednesday" => "INT NOT NULL",
+ "thursday" => "INT NOT NULL",
+ "friday" => "INT NOT NULL",
+ "saturday" => "INT NOT NULL",
+ "sunday" => "INT NOT NULL",
+ "start_date" => "INT NOT NULL",
+ "end_date" => "INT NOT NULL"
+ ],
+ "indexes" => ["start_date", "end_date"]
+ ],
+ "calendar_dates" => [
+ "columns" => [
+ "service_id" => "TEXT NOT NULL",
+ "date" => "INT NOT NULL",
+ "exception_type" => "INT NOT NULL"
+ ],
+ "indexes" => ["service_id", "date"]
+ ],
+ "fare_attributes" => [
+ "columns" => [
+ "fare_id" => "TEXT NOT NULL PRIMARY KEY",
+ "price" => "FLOAT NOT NULL",
+ "currency_type" => "INT NOT NULL",
+ "payment_method" => "INT NOT NULL",
+ "transfers" => "TEXT NOT NULL",
+ "agency_id" => "TEXT",
+ "transfer_duration" => "INT"
+ ]
+ ],
+ "fare_rules" => [
+ "columns" => [
+ "fare_id" => "TEXT NOT NULL",
+ "route_id" => "TEXT",
+ "origin_id" => "TEXT",
+ "destination_id" => "TEXT",
+ "contains_id" => "TEXT",
+ ]
+ ],
+ "shapes" => [
+ "columns" => [
+ "shape_id" => "TEXT PRIMARY KEY",
+ "shape_pt_lat" => "FLOAT NOT NULL",
+ "shape_pt_lon" => "FLOAT NOT NULL",
+ "shape_pt_sequence" => "INT NOT NULL",
+ "shape_dist_traveled" => "FLOAT NOT NULL"
+ ]
+ ],
+ "frequencies" => [
+ "columns" => [
+ "trip_id" => "TEXT NOT NULL",
+ "start_time" => "TEXT NOT NULL",
+ "end_time" => "TEXT NOT NULL",
+ "headway_secs" => "INT NOT NULL",
+ "exact_times" => "INT"
+ ],
+ "indexes" => ["trip_id"]
+ ],
+ "transfers" => [
+ "columns" => [
+ "from_stop_id" => "TEXT NOT NULL",
+ "to_stop_id" => "TEXT NOT NULL",
+ "transfer_type" => "INT NOT NULL",
+ "min_transfer_time" => "INT"
+ ],
+ "indexes" => ["from_stop_id", "to_stop_id"]
+ ],
+ "pathways" => [
+ "columns" => [
+ "pathway_id" => "TEXT PRIMARY KEY",
+ "from_stop_id" => "TEXT NOT NULL",
+ "to_stop_id" => "TEXT NOT NULL",
+ "pathway_mode" => "INT NOT NULL",
+ "is_bidirectional" => "INT NOT NULL",
+ "length" => "FLOAT",
+ "traversal_time" => "INT",
+ "stair_count" => "INT",
+ "max_slope" => "FLOAT",
+ "min_width" => "FLOAT",
+ "signposted_as" => "TEXT",
+ "reversed_signposted_as" => "TEXT"
+ ]
+ ],
+ "levels" => [
+ "columns" => [
+ "level_id" => "TEXT PRIMARY KEY",
+ "level_index" => "FLOAT NOT NULL",
+ "level_name" => "TEXT"
+ ]
+ ],
+ "feed_info" => [
+ "columns" => [
+ "feed_publisher_name" => "TEXT NOT NULL",
+ "feed_publisher_url" => "TEXT NOT NULL",
+ "feed_lang" => "TEXT NOT NULL",
+ "feed_start_date" => "INT",
+ "feed_end_date" => "INT",
+ "feed_version" => "TEXT",
+ "feed_contact_email" => "TEXT",
+ "feed_contact_url" => "TEXT"
+ ]
+ ]
+ ];
+
+ public static function fixTime($time) {
+ return str_pad($time, 8, "0", STR_PAD_LEFT);
+ }
+
+ public static function underscoreToCamelCase($string) {
+ return lcfirst(str_replace('_', '', ucwords($string, '_')));
+ }
+
+ public static function camelCaseToUnderscore($string) {
+ return strtolower(preg_replace("/([a-z])([A-Z])/", "$1_$2", $name));
+ }
+
+ public static function getFieldType($table, $field) {
+ if (!isset(self::$databases[$table]) || !isset(self::$databases[$table]["columns"][$field])) return false;
+
+ $definition = self::$databases[$table]["columns"][$field];
+
+ return explode(",", explode(" ", $definition)[0])[0];
+ }
+
+ private static function addRowsToTable($dbName, &$dbTemplate, &$stream) {
+ global $db;
+
+ $db->beginTransaction();
+
+ $query = null;
+
+ $headers = [];
+ $times = [];
+ $flag = true;
+ while (($line = fgetcsv($stream, null, ",")) !== false) {
+ if ($flag) {
+ $headers = $line;
+ $sql = "INSERT INTO $dbName (".implode(", ", $headers).") VALUES (".implode(", ", array_fill(0, count($headers), "?")).")";
+ if (isset($dbTemplate["times"])) {
+ foreach ($dbTemplate["times"] as $field) {
+ $times[] = array_search($field, $headers);
+ }
+ }
+ $query = $db->prepare($sql);
+ $flag = false;
+ continue;
+ }
+
+ $values = array_map(function($value) {
+ return trim($value);
+ }, $line);
+
+ foreach ($times as $time) {
+ $values[$time] = self::fixTime($values[$time]);
+ }
+
+ $query->execute($values);
+ }
+
+ $db->commit();
+
+ fclose($stream);
+ }
+
+ private static function setUpDatabase(&$zip) {
+ global $conf, $db;
+
+ @unlink($conf["databaseFile"]);
+ $db = new PDO('sqlite:'.($conf["databaseFile"]));
+
+ $db->beginTransaction();
+
+ foreach (self::$databases as $dbName => $dbTemplate) {
+ $definitions = [];
+ foreach ($dbTemplate["columns"] as $column => $definition) {
+ $definitions[] = $column." ".$definition;
+ }
+
+ $sql = "CREATE TABLE $dbName (".implode(", ", $definitions).")";
+ if ($db->query($sql)) {
+ echo "[info] Created table $dbName.\n";
+ } else {
+ echo "[error] Couldn't create table $dbName:\n".implode("\n", $db->errorInfo())."\n";
+ $db->rollBack();
+ exit();
+ }
+
+ if (isset($dbTemplate["indexes"])) {
+ foreach ($dbTemplate["indexes"] as $index) {
+ $sql = "CREATE INDEX ${dbName}_${index} ON $dbName ($index)";
+ if ($db->query($sql)) {
+ echo "[info] Created index $index.\n";
+ } else {
+ echo "[error] Couldn't create index $index:\n".implode("\n", $db->errorInfo())."\n";
+ $db->rollBack();
+ exit();
+ }
+ }
+ }
+ }
+
+ $db->commit();
+
+ foreach (self::$databases as $dbName => $dbTemplate) {
+ $stream = $zip->getStream($dbName.".txt");
+ if (!$stream) {
+ echo "[warning] The $dbName file does not exist.\n";
+ continue;
+ }
+
+ self::addRowsToTable($dbName, $dbTemplate, $stream);
+ echo "[info] Added rows to $dbName.\n";
+ }
+ }
+
+ public static function createDatabase($file) {
+ $zip = new ZipArchive();
+ $zip->open($file);
+
+ echo "[info] Setting up database:\n";
+ self::setUpDatabase($zip);
+ }
+}
diff --git a/inc/security.php b/inc/security.php
new file mode 100644
index 0000000..d90629f
--- /dev/null
+++ b/inc/security.php
@@ -0,0 +1,6 @@
+<?php
+class security {
+ public static function htmlsafe($string) {
+ return htmlspecialchars($string);
+ }
+}
diff --git a/inc/tmbApi.php b/inc/tmbApi.php
new file mode 100644
index 0000000..8c7aab7
--- /dev/null
+++ b/inc/tmbApi.php
@@ -0,0 +1,44 @@
+<?php
+class tmbApi {
+ const API_ENDPOINT = "https://api.tmb.cat/v1/";
+
+ public static function httpRequest($url, $method = "GET", $params = [], $file = null) {
+ $curl = curl_init();
+ curl_setopt_array($curl, [
+ CURLOPT_RETURNTRANSFER => 1,
+ CURLOPT_URL => $url
+ ]);
+
+ if ($method === "POST") {
+ curl_setopt($curl, CURLOPT_POST, 1);
+ if (!empty($params)) curl_setopt($curl, CURLOPT_POST_PARAMS, $params);
+ }
+
+
+ if ($file !== null) {
+ curl_setopt($curl, CURLOPT_FILE, $file);
+ }
+
+ $response = curl_exec($curl);
+ curl_close($curl);
+
+ if ($file === null) return $response;
+ return true;
+ }
+
+ public static function httpJSONRequest($url, $method = "GET", $params = []) {
+ $json = json_decode(self::httpRequest($url, $method, $params), true);
+ if (json_last_error() !== JSON_ERROR_NONE) return false;
+
+ return $json;
+ }
+
+ public static function request($action, $file = null) {
+ global $conf;
+
+ $url = self::API_ENDPOINT.$action."?app_id=".urlencode($conf["tmbApi"]["appId"])."&app_key=".urlencode($conf["tmbApi"]["appKey"]);
+
+ if ($file === null) return self::httpJSONRequest($url);
+ self::httpRequest($url, "GET", [], $file);
+ }
+}
diff --git a/inc/views.php b/inc/views.php
new file mode 100644
index 0000000..f1683e3
--- /dev/null
+++ b/inc/views.php
@@ -0,0 +1,26 @@
+<?php
+class views {
+ const VIEW_L9N_OLD = 0;
+ const VIEW_L9N_NEW = 1;
+ const VIEW_L9S = 2;
+
+ public static $views = [self::VIEW_L9N_OLD, self::VIEW_L9N_NEW, self::VIEW_L9S];
+ public static $viewsNames = [
+ self::VIEW_L9N_OLD => "VIEW_L9N_OLD",
+ self::VIEW_L9N_NEW => "VIEW_L9N_NEW",
+ self::VIEW_L9S => "VIEW_L9S"
+ ];
+ public static $viewsInclude = [
+ self::VIEW_L9N_OLD => "l9n.php",
+ self::VIEW_L9N_NEW => "l9n.php",
+ self::VIEW_L9S => "l9s.php"
+ ];
+
+ public static function renderPage($view) {
+ if (!in_array($view, self::$views)) return;
+
+ $gtfs = new gtfs();
+
+ require_once(__DIR__."/../views/".self::$viewsInclude[$view]);
+ }
+}
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..24bb3eb
--- /dev/null
+++ b/index.php
@@ -0,0 +1,37 @@
+<?php
+require_once("core.php");
+
+$gtfs = new gtfs();
+?>
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Panell d'informació</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" href="css/index.css">
+ </head>
+ <body>
+ <form action="info.php" method="GET">
+ <p>
+ <label for="station">Estació:</label>
+ <select name="station" id="station" required disabled></select>
+ </p>
+ <p>
+ <label for="view">Vista:</label>
+ <select name="view" id="view" required>
+ <?php
+ foreach (views::$views as $view) {
+ echo '<option value="'.(int)$view.'">'.security::htmlsafe(views::$viewsNames[$view] ?? "undefined").'</option>';
+ }
+ ?>
+ </select>
+ </p>
+ <p>
+ <button>Mostrar</button>
+ </p>
+ </form>
+
+ <script src="js/index.js"></script>
+ </body>
+</html>
diff --git a/info.php b/info.php
new file mode 100644
index 0000000..bb6d259
--- /dev/null
+++ b/info.php
@@ -0,0 +1,6 @@
+<?php
+require_once("core.php");
+
+if (!isset($_GET["view"])) exit();
+
+views::renderPage($_GET["view"]);
diff --git a/js/index.js b/js/index.js
new file mode 100644
index 0000000..9210c63
--- /dev/null
+++ b/js/index.js
@@ -0,0 +1,24 @@
+window.addEventListener("load", _ => {
+ fetch("ajax/api.php?action=stations").then(res => res.json()).then(res => {
+ if (res.status != "ok") throw Error("a");
+
+ var select = document.getElementById("station");
+
+ res.data.forEach(station => {
+ var option = document.createElement("option");
+ option.value = station.stop_id;
+ option.textContent = station.stop_name;
+ select.appendChild(option);
+ });
+
+ select.disabled = false;
+ }).catch(err => console.error(err));
+
+ if ('serviceWorker' in navigator) {
+ navigator.serviceWorker.register('sw.js').then(function(registration) {
+ console.log('ServiceWorker registration successful with scope: ', registration.scope);
+ }, function(err) {
+ console.log('ServiceWorker registration failed: ', err);
+ });
+ }
+});
diff --git a/js/views/l9n.js b/js/views/l9n.js
new file mode 100644
index 0000000..5951682
--- /dev/null
+++ b/js/views/l9n.js
@@ -0,0 +1,162 @@
+Number.prototype.mod = function(n) {
+ return ((this % n) + n) % n;
+}
+
+var scheduleController = {
+ maxSchedules: 6,
+ recommendedSchedulesPerLine: 2,
+ fetchInterval: 8*60*1000,
+ _times: [],
+ _queueTimes: [],
+ _lastTime: -1,
+ _lastDestinations: [],
+ _numRoutes: -1,
+ _stop: -1,
+ init: function() {
+ scheduleController.setStop();
+ scheduleController.removeDummy();
+ scheduleController.fetchTimes();
+ scheduleController.timer();
+ },
+ setStop: function() {
+ var params = new URLSearchParams(window.location.search);
+ scheduleController._stop = params.get("station");
+ },
+ isOldView: function() {
+ return document.body.classList.contains("view-old");
+ },
+ numSchedules: function() {
+ return Math.min(scheduleController.maxSchedules, 2 * scheduleController.recommendedSchedulesPerLine * scheduleController._numRoutes);
+ },
+ numSchedulesDetailed: function() {
+ return Math.ceil(scheduleController.numSchedules() / 2);
+ },
+ isDetailed: function(i) {
+ return (i < scheduleController.numSchedulesDetailed());
+ },
+ removeElement: function(el) {
+ el.parentNode.removeChild(el);
+ },
+ removeDummy: function() {
+ document.getElementById("trains").innerHTML = "";
+ },
+ timeSinceMidnight: function() {
+ var now = new Date();
+ var then = new Date(
+ now.getFullYear(),
+ now.getMonth(),
+ now.getDate(),
+ 0,0,0);
+ return Math.floor((now.getTime() - then.getTime())/1000);
+ },
+ prettyTime: function(seconds, detailed = true) {
+ if (detailed) return (Math.floor(seconds/60)).toString().padStart(2, '0')+":"+(seconds % 60).toString().padStart(2, '0');
+ return Math.floor(seconds/60)+"min";
+ },
+ addCurrentTime: function(data) {
+ var trains = document.getElementById("trains");
+
+ var train = document.createElement("div");
+ train.setAttribute("class", "train");
+
+ var logo = document.createElement("div");
+ logo.setAttribute("class", "logo");
+ logo.style.backgroundColor = "#"+data.color;
+ logo.style.color = "#"+data.textColor;
+ logo.style.fontSize = ("calc("+((scheduleController.isOldView() ? 20 : 18)/data.route.length)+"*var(--unit-size))");
+ logo.textContent = data.route;
+ train.appendChild(logo);
+
+ var destination = document.createElement("div");
+ destination.setAttribute("class", "destination");
+ destination.textContent = data.destination;
+ train.appendChild(destination);
+
+ var time = document.createElement("div");
+ time.setAttribute("class", "time");
+ train.appendChild(time);
+
+ trains.appendChild(train);
+
+ data._element = time;
+ data._markedToRemove = false;
+ scheduleController._times.push(data);
+ },
+ addTime: function(data) {
+ if (data.departureTime > scheduleController._lastTime) {
+ scheduleController._lastTime = data.departureTime;
+ scheduleController._lastDestinations = [data.destination];
+ } else if (data.departureTime == scheduleController.lastTime) {
+ var flag = false;
+ scheduleController._lastDestinations.forEach(dest => {
+ if (data.destination == dest) flag = true;
+ });
+
+ if (flag) {
+ return;
+ }
+
+ scheduleController._lastDestinations.push(dest);
+ } else return;
+
+ if (scheduleController._times.length < scheduleController.numSchedules()) {
+ scheduleController.addCurrentTime(data);
+ } else {
+ scheduleController._queueTimes.push(data);
+ }
+ },
+ fetchTimes: function() {
+ fetch("ajax/api.php?action=getTimes&stop="+scheduleController._stop).then(res => {
+ return res.json();
+ }).then(json => {
+ if (json.status != "ok") throw Error("Not ok");
+
+ scheduleController._numRoutes = json.data.numRoutes;
+
+ json.data.schedules.forEach(data => {
+ scheduleController.addTime(data);
+ });
+ });
+
+ setTimeout(scheduleController.fetchTimes, scheduleController.fetchInterval);
+ },
+ timer: function() {
+ var timeSinceMidnight = scheduleController.timeSinceMidnight();
+
+ var removed = 0;
+ for (var i = 0;; ++i) {
+ if (scheduleController._times[i - removed] === undefined) break;
+
+ if (scheduleController._times[i - removed]._markedToRemove) {
+ scheduleController.removeElement(scheduleController._times[i - removed]._element.parentNode);
+ scheduleController._times.shift();
+ ++removed;
+ }
+
+ if (scheduleController._times[i - removed].departureTime - timeSinceMidnight == 0) {
+ scheduleController._times[i - removed]._markedToRemove = true;
+ }
+ }
+
+ for (var i = 0; i < removed; ++i) {
+ if (scheduleController._queueTimes.length > 0) {
+ scheduleController.addCurrentTime(scheduleController._queueTimes.shift());
+ }
+ }
+
+ var i = 0;
+ scheduleController._times.forEach(time => {
+ var diff = (time.departureTime - timeSinceMidnight).mod(24*60*60);
+
+ time._element.textContent = scheduleController.prettyTime(diff, scheduleController.isDetailed(i));
+
+ ++i;
+ });
+
+ setTimeout(scheduleController.timer, (1000 - (new Date().getTime()) % 1000));
+ }
+};
+
+window.addEventListener("load", _ => {
+ scheduleController.init();
+});
diff --git a/proto/gtfs.proto b/proto/gtfs.proto
new file mode 100644
index 0000000..816ff22
--- /dev/null
+++ b/proto/gtfs.proto
@@ -0,0 +1,464 @@
+// Copyright 2012 Google Inc., Stichting OpenGeo, avm99963
+//
+// The content of this file is licensed under the Creative Commons Attribution
+// 3.0 License.
+//
+// Protocol definition file for a GTFS feed.
+
+syntax = "proto3";
+
+import "google/protobuf/any.proto";
+package gtfs;
+
+message FeedMessage {
+ // Metadata about this feed and feed message.
+ FeedHeader header = 1;
+
+ // Contents of the feed.
+ repeated FeedEntity entity = 2;
+}
+
+// Metadata about a feed, included in feed messages.
+message FeedHeader {
+ // Version of the feed specification.
+ // The current version is 1.0.
+ string gtfs_version = 1;
+
+ // The feed_publisher_name field contains the full name of the organization that publishes the feed.
+ string feed_publisher_name = 2;
+
+ // The feed_publisher_url field contains the URL of the feed publishing organization's website.
+ string feed_publisher_url = 3;
+
+ // The feed_lang field contains a IETF BCP 47 language code specifying the default language used for the text in this feed.
+ string feed_lang = 4;
+
+ // The feed provides complete and reliable schedule information for service in the period from the beginning of the
+ // feed_start_date day to the end of the feed_end_date day in YYYYMMDD
+ string feed_start_date = 5;
+ string feed_end_date = 6;
+
+ // The feed publisher can specify a string here that indicates the current version of their GTFS feed.
+ string feed_version = 7;
+
+ // The extensions namespace allows 3rd-party developers to extend the
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+// A definition (or update) of an entity in the transit feed.
+message FeedEntity {
+ // The ids are used only to provide incrementality support. The id should be
+ // unique within a FeedMessage. Consequent FeedMessages may contain
+ // FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ // FeedEntity with some id will replace the old FeedEntity with the same id
+ // (or delete it - see is_deleted below).
+ // The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ // feed must be specified by explicit selectors (see EntitySelector below for
+ // more info).
+ string id = 1;
+
+ // Whether this entity is to be deleted. Relevant only for incremental
+ // fetches.
+ bool is_deleted = 2;
+
+ // Data about the entity itself. Exactly one of the following fields must be
+ // present (unless the entity is being deleted).
+ oneof element {
+ Agency agency = 3;
+ Stop stop = 4;
+ Route route = 5;
+ Trip trip = 6;
+ StopTime stop_time = 7;
+ Calendar calendar = 8;
+ CalendarDate calendar_date = 9;
+ FareAttribute fare_attribute = 10;
+ FareRule fare_rule = 11;
+ Shape shape = 12;
+ Frequency frequency = 13;
+ Transfer transfer = 14;
+ }
+
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+//
+// Entities used in the feed.
+//
+
+message Agency {
+ // The agency_id field is an ID that uniquely identifies a transit agency.
+ string agency_id = 1;
+
+ // The agency_name field contains the full name of the transit agency.
+ string agency_name = 2;
+
+ // The agency_url field contains the URL of the transit agency.
+ string agency_url = 3;
+
+ // The agency_timezone field contains the timezone where the transit agency is located.
+ string agency_timezone = 4;
+
+ // The agency_lang field contains a two-letter ISO 639-1 code for the primary language used by this transit agency.
+ string agency_lang = 5;
+
+ // The agency_phone field contains a single voice telephone number for the specified agency.
+ string agency_phone = 6;
+
+ // The agency_fare_url specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online.
+ string agency_fare_url = 7;
+
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+message Stop {
+ // The stop_id field contains an ID that uniquely identifies a stop or station.
+ // Multiple routes may use the same stop. stop_id is dataset unique.
+ string stop_id = 1;
+
+ // The stop_code field contains short text or a number that uniquely identifies the stop for passengers.
+ string stop_code = 2;
+
+ // The stop_name field contains the name of a stop or station.
+ string stop_name = 3;
+
+ // The stop_desc field contains a description of a stop.
+ string stop_desc = 4;
+
+ // Degrees North, in the WGS-84 coordinate system.
+ float latitude = 5;
+
+ // Degrees East, in the WGS-84 coordinate system.
+ float longitude = 6;
+
+ string zone_id = 7;
+ string stop_url = 8;
+ enum LocationType {
+ // Stop (or Platform). A location where passengers board or disembark from a transit vehicle. Is called a platform when defined within a parent_station.
+ STOP = 0;
+
+ // Station. A physical structure or area that contains one or more platform.
+ STATION = 1;
+
+ // Entrance/Exit. A location where passengers can enter or exit a station from the street. If an entrance/exit belongs to multiple stations, it can be linked by pathways to both, but the data provider must pick one of them as parent.
+ ENTRANCE= 2;
+
+ // Generic Node. A location within a station, not matching any other location_type, which can be used to link together pathways define in pathways.txt.
+ GENERIC_NODE = 3;
+
+ // Boarding Area. A specific location on a platform, where passengers can board and/or alight vehicles.
+ BOARDING_AREA = 4;
+ }
+ LocationType location_type = 9;
+
+ string parent_station = 10;
+ string agency_timezone = 11;
+
+ enum WheelchairBoarding {
+ // no accessibility information for the stop
+ UNKNOWN = 0;
+
+ // some vehicles at this stop can be boarded by a rider in a wheelchair
+ ACCESSIBLE = 1;
+
+ // wheelchair boarding is not possible at this stop
+ NOT_ACCESSIBLE = 2;
+ }
+ // The exact status of the vehicle with respect to the current stop.
+ // Ignored if current_stop_sequence is missing.
+ WheelchairBoarding wheelchair_boarding = 12;
+
+ // The extensions namespace allows 3rd-party developers to extend the
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+message Route {
+ // The route_id field contains an ID that uniquely identifies a route.
+ // The route_id is dataset unique.
+ string route_id = 1;
+
+ // The agency_id field defines an agency for the specified route.
+ string agency_id = 2;
+
+ // The route_short_name contains the short name of a route.
+ string route_short_name = 3;
+
+ // The route_long_name contains the full name of a route.
+ string route_long_name = 4;
+
+ // The route_desc field contains a description of a route.
+ string route_desc = 5;
+
+ // The route_type field describes the type of transportation used on a route.
+ enum RouteType {
+ // Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area.
+ TRAM = 0;
+
+ // Subway, Metro. Any underground rail system within a metropolitan area.
+ SUBWAY = 1;
+
+ // Rail. Used for intercity or long-distance travel.
+ RAIL = 2;
+
+ // Bus. Used for short- and long-distance bus routes.
+ BUS = 3;
+
+ // Ferry. Used for short- and long-distance boat service.
+ FERRY = 4;
+
+ // Cable car. Used for street-level cable cars where the cable runs beneath the car.
+ CABLECAR = 5;
+
+ // Gondola, Suspended cable car. Typically used for aerial cable cars where the car is suspended from the cable.
+ GONDOLA = 6;
+
+ // Funicular. Any rail system designed for steep inclines.
+ FUNICULAR = 7;
+ }
+ RouteType route_type = 6;
+
+ // The route_url field contains the URL of a web page about that particular route.
+ string route_url = 7;
+
+ // In systems that have colors assigned to routes, the route_color field defines a color that corresponds to a route.
+ // The color must be provided as a six-character hexadecimal number, for example, 00FFFF.
+ string route_color = 8;
+
+ // The route_text_color field can be used to specify a legible color to use for text drawn against a background of route_color.
+ string route_text_color = 9;
+
+ // The extensions namespace allows 3rd-party developers to extend the
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+
+message Trip {
+ // The route_id field contains an ID that uniquely identifies a route.
+ string route_id = 1;
+
+ // The service_id contains an ID that uniquely identifies a set of dates when service is available for one or more routes.
+ string service_id = 2;
+
+ // The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ string trip_id = 3;
+
+ // The trip_headsign field contains the text that appears on a sign that identifies the trip's destination to passengers.
+ string trip_headsign = 4;
+
+ // The trip_short_name field contains the text that appears in schedules and sign boards to identify the trip to passengers.
+ string trip_short_name = 5;
+
+ // The direction_id field contains a binary value that indicates the direction of travel for a trip.
+ enum Direction {
+ OUTBOUND = 0;
+
+ INBOUND = 1;
+ }
+ Direction direction_id = 6;
+
+ // The block_id field identifies the block to which the trip belongs.
+ // A block consists of two or more sequential trips made using the same vehicle,
+ // where a passenger can transfer from one trip to the next just by staying in the vehicle.
+ string block_id = 7;
+
+ // The shape_id field contains an ID that defines a shape for the trip.
+ string shape_id = 8;
+
+ // The extensions namespace allows 3rd-party developers to extend the
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+message StopTime {
+ // The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ string trip_id = 1;
+
+ string arrival_time = 2;
+ string departure_time = 3;
+
+ // TODO: Brian why not make this:
+ // int32 arrival_time_secs = 2;
+ // int32 departure_time_secs = 3;
+
+ string stop_id = 4;
+ string stop_sequence = 5;
+
+ string stop_headsign = 6;
+
+ enum AvailabilityType {
+ // Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area.
+ REGULAR = 0;
+
+ // Subway, Metro. Any underground rail system within a metropolitan area.
+ NOT_AVAILABLE = 1;
+
+ // Rail. Used for intercity or long-distance travel.
+ PHONE = 2;
+
+ // Bus. Used for short- and long-distance bus routes.
+ DRIVER = 3;
+ }
+ AvailabilityType pickup_type = 7;
+
+ AvailabilityType drop_off_type = 8;
+
+ float shape_dist_traveled = 9;
+
+ // The extensions namespace allows 3rd-party developers to extend the
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+message Calendar {
+ // The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ string service_id = 1;
+
+ enum CalendarDay {
+ NOT_AVAILABLE = 0;
+ AVAILABLE = 1;
+ }
+ CalendarDay monday = 2;
+ CalendarDay tuesday = 3;
+ CalendarDay wednesday = 4;
+ CalendarDay thursday = 5;
+ CalendarDay friday = 6;
+ CalendarDay saturday = 7;
+ CalendarDay sunday = 8;
+
+ string start_date = 9;
+ string end_date = 10;
+
+ // The extensions namespace allows 3rd-party developers to extend the
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+message CalendarDate {
+ // The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique.
+ string service_id = 1;
+
+ string date = 2;
+
+ enum ExceptionType {
+ UNUSED_UNKNOWN = 0;
+ ADDED = 1;
+ REMOVED = 2;
+ }
+ ExceptionType exception_type = 3;
+
+ // The extensions namespace allows 3rd-party developers to extend the
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+message FareAttribute {
+ string fare_id = 1;
+ float price = 2;
+ string currency_type = 3;
+
+ enum PaymentMethod {
+ ONBOARD = 0;
+ PREBOARDING = 1;
+ }
+ PaymentMethod payment_method = 4;
+
+ enum Transfers {
+ NO = 0;
+ ONCE = 1;
+ TWICE = 2;
+ UNLIMITED = 3;
+ }
+ Transfers transfers = 5;
+
+ int32 transfer_duration = 6;
+
+ // The extensions namespace allows 3rd-party developers to extend the
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+message FareRule {
+ string fare_id = 1;
+ string route_id = 2;
+ string origin_id = 3;
+ string destination_id = 4;
+ string contains_id = 5;
+ // The extensions namespace allows 3rd-party developers to extend the
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+message Shape {
+ string shape_id = 1;
+ float shape_pt_lat = 2;
+ float shape_pt_lon = 3;
+ int32 shape_pt_sequence = 4;
+ float shape_dist_traveled = 5;
+
+ // The extensions namespace allows 3rd-party developers to extend the
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+message Frequency {
+ string trip_id = 1;
+ string start_time = 2;
+ string end_time = 3;
+ int32 headway_secs = 4;
+ enum ScheduleType {
+ NOT_EXACTLY = 0;
+ EXACTLY = 1;
+ }
+ ScheduleType exact_times = 5;
+ // The extensions namespace allows 3rd-party developers to extend the
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
+
+message Transfer {
+ string from_stop_id = 1;
+ string to_stop_id = 2;
+ enum TransferType {
+ RECOMMENDED = 0;
+ TIMED = 1;
+ MINIMUM = 2;
+ NOT_POSSIBLE = 3;
+ }
+ TransferType transfer_type = 3;
+
+ int32 min_transfer_time = 4;
+
+ // The extensions namespace allows 3rd-party developers to extend the
+ // GTFS specification in order to add and evaluate new features and
+ // modifications to the spec.
+ google.protobuf.Any extension = 2000;
+ reserved 1000 to 1999;
+}
diff --git a/sqldeprecated.txt b/sqldeprecated.txt
new file mode 100644
index 0000000..ffac11a
--- /dev/null
+++ b/sqldeprecated.txt
@@ -0,0 +1,71 @@
+$sql = "SELECT st.*, t.*, r.*, strftime('%Y%m%d', '22:34:12') as today, strftime('%Y%m%d', '22:34:12', '1 day') as tomorrow, time('22:34:12') as now
+ FROM stop_times st
+ INNER JOIN trips t
+ ON st.trip_id = t.trip_id
+ INNER JOIN routes r
+ ON t.route_id = r.route_id
+ LEFT JOIN calendar c
+ ON t.service_id = c.service_id
+ LEFT JOIN calendar_dates cd
+ ON t.service_id = cd.service_id
+ WHERE
+ st.stop_id IN (".implode(", ", array_fill(0, count($stops), "?")).") AND
+ (
+ (
+ time(now) < time('23:30:00') AND
+ time(st.departure_time) BETWEEN time(now) AND time(now, '30 minutes') AND
+ (
+ c.service_id IS NULL OR
+ (
+ c.start_date <= today AND
+ c.end_date >= today
+ )
+ ) AND
+ (
+ cd.service_id IS NULL OR
+ cd.date = today
+ )
+ ) OR
+ (
+ time(now) >= time('23:30:00') AND
+ (
+ (
+ time(st.departure_time) >= time(now) AND
+ (
+ c.service_id IS NULL OR
+ (
+ c.start_date <= today AND
+ c.end_date >= today
+ )
+ ) AND
+ (
+ cd.service_id IS NULL OR
+ cd.date = today
+ )
+ ) OR
+ (
+ time(st.departure_time) <= time(now, '30 minutes') AND
+ (
+ c.service_id IS NULL OR
+ (
+ c.start_date <= tomorrow AND
+ c.end_date >= tomorrow
+ )
+ ) AND
+ (
+ cd.service_id IS NULL OR
+ cd.date = tomorrow
+ )
+ )
+ )
+ )
+ ) AND
+ (
+ c.service_id IS NULL OR
+ c.$dow = ".(int)Gtfs\Calendar\CalendarDay::AVAILABLE."
+ ) AND
+ (
+ cd.service_id IS NULL OR
+ exception_type = ".(int)Gtfs\CalendarDate\ExceptionType::ADDED."
+ )
+ ORDER BY departure_time ASC";
diff --git a/sw.js b/sw.js
new file mode 100644
index 0000000..b5cce5c
--- /dev/null
+++ b/sw.js
@@ -0,0 +1,39 @@
+var CACHE_NAME = 'linia-cache-v1';
+var urlsToCache = [
+ '.',
+ 'js/index.js',
+ 'css/index.css',
+ 'info.php?view=0',
+ 'info.php?view=1',
+ 'js/views/l9n.js',
+ 'css/views/l9n.css'
+];
+
+self.addEventListener('install', function(event) {
+ // Perform install steps
+ event.waitUntil(
+ caches.open(CACHE_NAME).then(cache => {
+ return cache.addAll(urlsToCache);
+ })
+ );
+});
+
+self.addEventListener('fetch', function(event) {
+ var request = event.request;
+ var url = new URL(request.url);
+ url.searchParams.delete("station");
+ request = new Request(url.toString());
+
+ event.respondWith(
+ caches.match(request).then(response => {
+ // Cache hit - return response
+ if (response) {
+ return response;
+ }
+
+ return fetch(event.request);
+ }).catch(err => {
+ console.error(err);
+ })
+ );
+});
diff --git a/test.php b/test.php
new file mode 100644
index 0000000..10aed56
--- /dev/null
+++ b/test.php
@@ -0,0 +1,47 @@
+<?php
+/*require_once("core.php");
+
+$element = "Gtfs\CalendarDate";
+
+$item = new $element([
+ "service_id" => "a",
+ "date" => "b",
+ "exception_type" => Gtfs\CalendarDate\ExceptionType::ADDED
+]);
+
+//$feed->setServiceId(Gtfs\CalendarDate\ExceptionType::ADDED);
+
+var_dump(json_decode($item->serializeToJsonString(), true));
+*/
+?>
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ @media (orientation: landscape) {
+ :root {
+ --size: 4vh;
+ }
+ }
+
+ @media (orientation: portrait) {
+ :root {
+ --size: 4vw;
+ }
+ }
+
+ .a {
+ font-size: calc(4 * var(--size));
+ background: cyan;
+ width: 400px;
+ height: 400px;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="a">
+ Adri
+ </div>
+ </body>
+</html>
diff --git a/vendor/autoload.php b/vendor/autoload.php
new file mode 100644
index 0000000..9703d3c
--- /dev/null
+++ b/vendor/autoload.php
@@ -0,0 +1,7 @@
+<?php
+
+// autoload.php @generated by Composer
+
+require_once __DIR__ . '/composer/autoload_real.php';
+
+return ComposerAutoloaderInit13163adc30f7dea8ccb9868cafbfd377::getLoader();
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
new file mode 100644
index 0000000..fce8549
--- /dev/null
+++ b/vendor/composer/ClassLoader.php
@@ -0,0 +1,445 @@
+<?php
+
+/*
+ * This file is part of Composer.
+ *
+ * (c) Nils Adermann <naderman@naderman.de>
+ * Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
+ *
+ * $loader = new \Composer\Autoload\ClassLoader();
+ *
+ * // register classes with namespaces
+ * $loader->add('Symfony\Component', __DIR__.'/component');
+ * $loader->add('Symfony', __DIR__.'/framework');
+ *
+ * // activate the autoloader
+ * $loader->register();
+ *
+ * // to enable searching the include path (eg. for PEAR packages)
+ * $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ * @see http://www.php-fig.org/psr/psr-0/
+ * @see http://www.php-fig.org/psr/psr-4/
+ */
+class ClassLoader
+{
+ // PSR-4
+ private $prefixLengthsPsr4 = array();
+ private $prefixDirsPsr4 = array();
+ private $fallbackDirsPsr4 = array();
+
+ // PSR-0
+ private $prefixesPsr0 = array();
+ private $fallbackDirsPsr0 = array();
+
+ private $useIncludePath = false;
+ private $classMap = array();
+ private $classMapAuthoritative = false;
+ private $missingClasses = array();
+ private $apcuPrefix;
+
+ public function getPrefixes()
+ {
+ if (!empty($this->prefixesPsr0)) {
+ return call_user_func_array('array_merge', $this->prefixesPsr0);
+ }
+
+ return array();
+ }
+
+ public function getPrefixesPsr4()
+ {
+ return $this->prefixDirsPsr4;
+ }
+
+ public function getFallbackDirs()
+ {
+ return $this->fallbackDirsPsr0;
+ }
+
+ public function getFallbackDirsPsr4()
+ {
+ return $this->fallbackDirsPsr4;
+ }
+
+ public function getClassMap()
+ {
+ return $this->classMap;
+ }
+
+ /**
+ * @param array $classMap Class to filename map
+ */
+ public function addClassMap(array $classMap)
+ {
+ if ($this->classMap) {
+ $this->classMap = array_merge($this->classMap, $classMap);
+ } else {
+ $this->classMap = $classMap;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix, either
+ * appending or prepending to the ones previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param array|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
+ */
+ public function add($prefix, $paths, $prepend = false)
+ {
+ if (!$prefix) {
+ if ($prepend) {
+ $this->fallbackDirsPsr0 = array_merge(
+ (array) $paths,
+ $this->fallbackDirsPsr0
+ );
+ } else {
+ $this->fallbackDirsPsr0 = array_merge(
+ $this->fallbackDirsPsr0,
+ (array) $paths
+ );
+ }
+
+ return;
+ }
+
+ $first = $prefix[0];
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+
+ return;
+ }
+ if ($prepend) {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ (array) $paths,
+ $this->prefixesPsr0[$first][$prefix]
+ );
+ } else {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ $this->prefixesPsr0[$first][$prefix],
+ (array) $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace, either
+ * appending or prepending to the ones previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param array|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function addPsr4($prefix, $paths, $prepend = false)
+ {
+ if (!$prefix) {
+ // Register directories for the root namespace.
+ if ($prepend) {
+ $this->fallbackDirsPsr4 = array_merge(
+ (array) $paths,
+ $this->fallbackDirsPsr4
+ );
+ } else {
+ $this->fallbackDirsPsr4 = array_merge(
+ $this->fallbackDirsPsr4,
+ (array) $paths
+ );
+ }
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
+ // Register directories for a new namespace.
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ } elseif ($prepend) {
+ // Prepend directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ (array) $paths,
+ $this->prefixDirsPsr4[$prefix]
+ );
+ } else {
+ // Append directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ $this->prefixDirsPsr4[$prefix],
+ (array) $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix,
+ * replacing any others previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param array|string $paths The PSR-0 base directories
+ */
+ public function set($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr0 = (array) $paths;
+ } else {
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace,
+ * replacing any others previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param array|string $paths The PSR-4 base directories
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function setPsr4($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr4 = (array) $paths;
+ } else {
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Turns on searching the include path for class files.
+ *
+ * @param bool $useIncludePath
+ */
+ public function setUseIncludePath($useIncludePath)
+ {
+ $this->useIncludePath = $useIncludePath;
+ }
+
+ /**
+ * Can be used to check if the autoloader uses the include path to check
+ * for classes.
+ *
+ * @return bool
+ */
+ public function getUseIncludePath()
+ {
+ return $this->useIncludePath;
+ }
+
+ /**
+ * Turns off searching the prefix and fallback directories for classes
+ * that have not been registered with the class map.
+ *
+ * @param bool $classMapAuthoritative
+ */
+ public function setClassMapAuthoritative($classMapAuthoritative)
+ {
+ $this->classMapAuthoritative = $classMapAuthoritative;
+ }
+
+ /**
+ * Should class lookup fail if not found in the current class map?
+ *
+ * @return bool
+ */
+ public function isClassMapAuthoritative()
+ {
+ return $this->classMapAuthoritative;
+ }
+
+ /**
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
+ *
+ * @param string|null $apcuPrefix
+ */
+ public function setApcuPrefix($apcuPrefix)
+ {
+ $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
+ }
+
+ /**
+ * The APCu prefix in use, or null if APCu caching is not enabled.
+ *
+ * @return string|null
+ */
+ public function getApcuPrefix()
+ {
+ return $this->apcuPrefix;
+ }
+
+ /**
+ * Registers this instance as an autoloader.
+ *
+ * @param bool $prepend Whether to prepend the autoloader or not
+ */
+ public function register($prepend = false)
+ {
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+ }
+
+ /**
+ * Unregisters this instance as an autoloader.
+ */
+ public function unregister()
+ {
+ spl_autoload_unregister(array($this, 'loadClass'));
+ }
+
+ /**
+ * Loads the given class or interface.
+ *
+ * @param string $class The name of the class
+ * @return bool|null True if loaded, null otherwise
+ */
+ public function loadClass($class)
+ {
+ if ($file = $this->findFile($class)) {
+ includeFile($file);
+
+ return true;
+ }
+ }
+
+ /**
+ * Finds the path to the file where the class is defined.
+ *
+ * @param string $class The name of the class
+ *
+ * @return string|false The path if found, false otherwise
+ */
+ public function findFile($class)
+ {
+ // class map lookup
+ if (isset($this->classMap[$class])) {
+ return $this->classMap[$class];
+ }
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
+ return false;
+ }
+ if (null !== $this->apcuPrefix) {
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
+ if ($hit) {
+ return $file;
+ }
+ }
+
+ $file = $this->findFileWithExtension($class, '.php');
+
+ // Search for Hack files if we are running on HHVM
+ if (false === $file && defined('HHVM_VERSION')) {
+ $file = $this->findFileWithExtension($class, '.hh');
+ }
+
+ if (null !== $this->apcuPrefix) {
+ apcu_add($this->apcuPrefix.$class, $file);
+ }
+
+ if (false === $file) {
+ // Remember that this class does not exist.
+ $this->missingClasses[$class] = true;
+ }
+
+ return $file;
+ }
+
+ private function findFileWithExtension($class, $ext)
+ {
+ // PSR-4 lookup
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
+
+ $first = $class[0];
+ if (isset($this->prefixLengthsPsr4[$first])) {
+ $subPath = $class;
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
+ $subPath = substr($subPath, 0, $lastPos);
+ $search = $subPath . '\\';
+ if (isset($this->prefixDirsPsr4[$search])) {
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
+ if (file_exists($file = $dir . $pathEnd)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-4 fallback dirs
+ foreach ($this->fallbackDirsPsr4 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 lookup
+ if (false !== $pos = strrpos($class, '\\')) {
+ // namespaced class name
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
+ } else {
+ // PEAR-like class name
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
+ }
+
+ if (isset($this->prefixesPsr0[$first])) {
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
+ if (0 === strpos($class, $prefix)) {
+ foreach ($dirs as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-0 fallback dirs
+ foreach ($this->fallbackDirsPsr0 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 include paths.
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
+ return $file;
+ }
+
+ return false;
+ }
+}
+
+/**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ */
+function includeFile($file)
+{
+ include $file;
+}
diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE
new file mode 100644
index 0000000..f27399a
--- /dev/null
+++ b/vendor/composer/LICENSE
@@ -0,0 +1,21 @@
+
+Copyright (c) Nils Adermann, Jordi Boggiano
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
new file mode 100644
index 0000000..7a91153
--- /dev/null
+++ b/vendor/composer/autoload_classmap.php
@@ -0,0 +1,9 @@
+<?php
+
+// autoload_classmap.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+);
diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php
new file mode 100644
index 0000000..b7fc012
--- /dev/null
+++ b/vendor/composer/autoload_namespaces.php
@@ -0,0 +1,9 @@
+<?php
+
+// autoload_namespaces.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+);
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
new file mode 100644
index 0000000..fdc285b
--- /dev/null
+++ b/vendor/composer/autoload_psr4.php
@@ -0,0 +1,11 @@
+<?php
+
+// autoload_psr4.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+ 'Google\\Protobuf\\' => array($vendorDir . '/google/protobuf/src/Google/Protobuf'),
+ 'GPBMetadata\\Google\\Protobuf\\' => array($vendorDir . '/google/protobuf/src/GPBMetadata/Google/Protobuf'),
+);
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
new file mode 100644
index 0000000..29aac13
--- /dev/null
+++ b/vendor/composer/autoload_real.php
@@ -0,0 +1,52 @@
+<?php
+
+// autoload_real.php @generated by Composer
+
+class ComposerAutoloaderInit13163adc30f7dea8ccb9868cafbfd377
+{
+ private static $loader;
+
+ public static function loadClassLoader($class)
+ {
+ if ('Composer\Autoload\ClassLoader' === $class) {
+ require __DIR__ . '/ClassLoader.php';
+ }
+ }
+
+ public static function getLoader()
+ {
+ if (null !== self::$loader) {
+ return self::$loader;
+ }
+
+ spl_autoload_register(array('ComposerAutoloaderInit13163adc30f7dea8ccb9868cafbfd377', 'loadClassLoader'), true, true);
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader();
+ spl_autoload_unregister(array('ComposerAutoloaderInit13163adc30f7dea8ccb9868cafbfd377', 'loadClassLoader'));
+
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
+ if ($useStaticLoader) {
+ require_once __DIR__ . '/autoload_static.php';
+
+ call_user_func(\Composer\Autoload\ComposerStaticInit13163adc30f7dea8ccb9868cafbfd377::getInitializer($loader));
+ } else {
+ $map = require __DIR__ . '/autoload_namespaces.php';
+ foreach ($map as $namespace => $path) {
+ $loader->set($namespace, $path);
+ }
+
+ $map = require __DIR__ . '/autoload_psr4.php';
+ foreach ($map as $namespace => $path) {
+ $loader->setPsr4($namespace, $path);
+ }
+
+ $classMap = require __DIR__ . '/autoload_classmap.php';
+ if ($classMap) {
+ $loader->addClassMap($classMap);
+ }
+ }
+
+ $loader->register(true);
+
+ return $loader;
+ }
+}
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
new file mode 100644
index 0000000..3d50f6c
--- /dev/null
+++ b/vendor/composer/autoload_static.php
@@ -0,0 +1,36 @@
+<?php
+
+// autoload_static.php @generated by Composer
+
+namespace Composer\Autoload;
+
+class ComposerStaticInit13163adc30f7dea8ccb9868cafbfd377
+{
+ public static $prefixLengthsPsr4 = array (
+ 'G' =>
+ array (
+ 'Google\\Protobuf\\' => 16,
+ 'GPBMetadata\\Google\\Protobuf\\' => 28,
+ ),
+ );
+
+ public static $prefixDirsPsr4 = array (
+ 'Google\\Protobuf\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/protobuf/src/Google/Protobuf',
+ ),
+ 'GPBMetadata\\Google\\Protobuf\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/protobuf/src/GPBMetadata/Google/Protobuf',
+ ),
+ );
+
+ public static function getInitializer(ClassLoader $loader)
+ {
+ return \Closure::bind(function () use ($loader) {
+ $loader->prefixLengthsPsr4 = ComposerStaticInit13163adc30f7dea8ccb9868cafbfd377::$prefixLengthsPsr4;
+ $loader->prefixDirsPsr4 = ComposerStaticInit13163adc30f7dea8ccb9868cafbfd377::$prefixDirsPsr4;
+
+ }, null, ClassLoader::class);
+ }
+}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
new file mode 100644
index 0000000..0ea222a
--- /dev/null
+++ b/vendor/composer/installed.json
@@ -0,0 +1,45 @@
+[
+ {
+ "name": "google/protobuf",
+ "version": "v3.11.2",
+ "version_normalized": "3.11.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/protocolbuffers/protobuf-php.git",
+ "reference": "0864882396746542ead01fc002e1644b9490dbe8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/0864882396746542ead01fc002e1644b9490dbe8",
+ "reference": "0864882396746542ead01fc002e1644b9490dbe8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": ">=4.8.0"
+ },
+ "suggest": {
+ "ext-bcmath": "Need to support JSON deserialization"
+ },
+ "time": "2019-12-14T00:45:36+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Google\\Protobuf\\": "src/Google/Protobuf",
+ "GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "proto library for PHP",
+ "homepage": "https://developers.google.com/protocol-buffers/",
+ "keywords": [
+ "proto"
+ ]
+ }
+]
diff --git a/vendor/google/protobuf/LICENSE b/vendor/google/protobuf/LICENSE
new file mode 100644
index 0000000..ba32af4
--- /dev/null
+++ b/vendor/google/protobuf/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2019, Protocol Buffers
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/google/protobuf/README.md b/vendor/google/protobuf/README.md
new file mode 100644
index 0000000..3663050
--- /dev/null
+++ b/vendor/google/protobuf/README.md
@@ -0,0 +1,2 @@
+# protobuf-php
+This repository contains only PHP files to support Composer installation. This repository is a mirror of [protobuf](https://github.com/protocolbuffers/protobuf). Any support requests, bug reports, or development contributions should be directed to that project. To install protobuf for PHP, please see https://github.com/protocolbuffers/protobuf/tree/master/php
diff --git a/vendor/google/protobuf/composer.json b/vendor/google/protobuf/composer.json
new file mode 100644
index 0000000..69a3297
--- /dev/null
+++ b/vendor/google/protobuf/composer.json
@@ -0,0 +1,23 @@
+{
+ "name": "google/protobuf",
+ "type": "library",
+ "description": "proto library for PHP",
+ "keywords": ["proto"],
+ "homepage": "https://developers.google.com/protocol-buffers/",
+ "license": "BSD-3-Clause",
+ "require": {
+ "php": ">=5.5.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": ">=4.8.0"
+ },
+ "suggest": {
+ "ext-bcmath": "Need to support JSON deserialization"
+ },
+ "autoload": {
+ "psr-4": {
+ "Google\\Protobuf\\": "src/Google/Protobuf",
+ "GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf"
+ }
+ }
+}
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Any.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Any.php
new file mode 100644
index 0000000..22cc250
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Any.php
@@ -0,0 +1,30 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/any.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class Any
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->internalAddGeneratedFile(hex2bin(
+ "0acd010a19676f6f676c652f70726f746f6275662f616e792e70726f746f" .
+ "120f676f6f676c652e70726f746f62756622260a03416e7912100a087479" .
+ "70655f75726c180120012809120d0a0576616c756518022001280c426f0a" .
+ "13636f6d2e676f6f676c652e70726f746f6275664208416e7950726f746f" .
+ "50015a256769746875622e636f6d2f676f6c616e672f70726f746f627566" .
+ "2f7074797065732f616e79a20203475042aa021e476f6f676c652e50726f" .
+ "746f6275662e57656c6c4b6e6f776e5479706573620670726f746f33"
+ ));
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php
new file mode 100644
index 0000000..b18e0d3
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php
@@ -0,0 +1,49 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/api.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class Api
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ \GPBMetadata\Google\Protobuf\SourceContext::initOnce();
+ \GPBMetadata\Google\Protobuf\Type::initOnce();
+ $pool->internalAddGeneratedFile(hex2bin(
+ "0ac8050a19676f6f676c652f70726f746f6275662f6170692e70726f746f" .
+ "120f676f6f676c652e70726f746f6275661a1a676f6f676c652f70726f74" .
+ "6f6275662f747970652e70726f746f2281020a03417069120c0a046e616d" .
+ "6518012001280912280a076d6574686f647318022003280b32172e676f6f" .
+ "676c652e70726f746f6275662e4d6574686f6412280a076f7074696f6e73" .
+ "18032003280b32172e676f6f676c652e70726f746f6275662e4f7074696f" .
+ "6e120f0a0776657273696f6e18042001280912360a0e736f757263655f63" .
+ "6f6e7465787418052001280b321e2e676f6f676c652e70726f746f627566" .
+ "2e536f75726365436f6e7465787412260a066d6978696e7318062003280b" .
+ "32162e676f6f676c652e70726f746f6275662e4d6978696e12270a067379" .
+ "6e74617818072001280e32172e676f6f676c652e70726f746f6275662e53" .
+ "796e74617822d5010a064d6574686f64120c0a046e616d65180120012809" .
+ "12180a10726571756573745f747970655f75726c18022001280912190a11" .
+ "726571756573745f73747265616d696e6718032001280812190a11726573" .
+ "706f6e73655f747970655f75726c180420012809121a0a12726573706f6e" .
+ "73655f73747265616d696e6718052001280812280a076f7074696f6e7318" .
+ "062003280b32172e676f6f676c652e70726f746f6275662e4f7074696f6e" .
+ "12270a0673796e74617818072001280e32172e676f6f676c652e70726f74" .
+ "6f6275662e53796e74617822230a054d6978696e120c0a046e616d651801" .
+ "20012809120c0a04726f6f7418022001280942750a13636f6d2e676f6f67" .
+ "6c652e70726f746f627566420841706950726f746f50015a2b676f6f676c" .
+ "652e676f6c616e672e6f72672f67656e70726f746f2f70726f746f627566" .
+ "2f6170693b617069a20203475042aa021e476f6f676c652e50726f746f62" .
+ "75662e57656c6c4b6e6f776e5479706573620670726f746f33"
+ ));
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Duration.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Duration.php
new file mode 100644
index 0000000..b1c85ad
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Duration.php
@@ -0,0 +1,31 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/duration.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class Duration
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->internalAddGeneratedFile(hex2bin(
+ "0ae3010a1e676f6f676c652f70726f746f6275662f6475726174696f6e2e" .
+ "70726f746f120f676f6f676c652e70726f746f627566222a0a0844757261" .
+ "74696f6e120f0a077365636f6e6473180120012803120d0a056e616e6f73" .
+ "180220012805427c0a13636f6d2e676f6f676c652e70726f746f62756642" .
+ "0d4475726174696f6e50726f746f50015a2a6769746875622e636f6d2f67" .
+ "6f6c616e672f70726f746f6275662f7074797065732f6475726174696f6e" .
+ "f80101a20203475042aa021e476f6f676c652e50726f746f6275662e5765" .
+ "6c6c4b6e6f776e5479706573620670726f746f33"
+ ));
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/FieldMask.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/FieldMask.php
new file mode 100644
index 0000000..5812be1
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/FieldMask.php
@@ -0,0 +1,31 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/field_mask.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class FieldMask
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->internalAddGeneratedFile(hex2bin(
+ "0ae3010a20676f6f676c652f70726f746f6275662f6669656c645f6d6173" .
+ "6b2e70726f746f120f676f6f676c652e70726f746f627566221a0a094669" .
+ "656c644d61736b120d0a0570617468731801200328094289010a13636f6d" .
+ "2e676f6f676c652e70726f746f627566420e4669656c644d61736b50726f" .
+ "746f50015a39676f6f676c652e676f6c616e672e6f72672f67656e70726f" .
+ "746f2f70726f746f6275662f6669656c645f6d61736b3b6669656c645f6d" .
+ "61736ba20203475042aa021e476f6f676c652e50726f746f6275662e5765" .
+ "6c6c4b6e6f776e5479706573620670726f746f33"
+ ));
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/GPBEmpty.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/GPBEmpty.php
new file mode 100644
index 0000000..88f42a1
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/GPBEmpty.php
@@ -0,0 +1,30 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/empty.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class GPBEmpty
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->internalAddGeneratedFile(hex2bin(
+ "0ab7010a1b676f6f676c652f70726f746f6275662f656d7074792e70726f" .
+ "746f120f676f6f676c652e70726f746f62756622070a05456d7074794276" .
+ "0a13636f6d2e676f6f676c652e70726f746f627566420a456d7074795072" .
+ "6f746f50015a276769746875622e636f6d2f676f6c616e672f70726f746f" .
+ "6275662f7074797065732f656d707479f80101a20203475042aa021e476f" .
+ "6f676c652e50726f746f6275662e57656c6c4b6e6f776e54797065736206" .
+ "70726f746f33"
+ ));
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
new file mode 100644
index 0000000..e6362f2
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
@@ -0,0 +1,277 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace GPBMetadata\Google\Protobuf\Internal;
+
+class Descriptor
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->addMessage('google.protobuf.internal.FileDescriptorSet', \Google\Protobuf\Internal\FileDescriptorSet::class)
+ ->repeated('file', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.FileDescriptorProto')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.FileDescriptorProto', \Google\Protobuf\Internal\FileDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('package', \Google\Protobuf\Internal\GPBType::STRING, 2)
+ ->repeated('dependency', \Google\Protobuf\Internal\GPBType::STRING, 3)
+ ->repeated('public_dependency', \Google\Protobuf\Internal\GPBType::INT32, 10)
+ ->repeated('weak_dependency', \Google\Protobuf\Internal\GPBType::INT32, 11)
+ ->repeated('message_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.DescriptorProto')
+ ->repeated('enum_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 5, 'google.protobuf.internal.EnumDescriptorProto')
+ ->repeated('service', \Google\Protobuf\Internal\GPBType::MESSAGE, 6, 'google.protobuf.internal.ServiceDescriptorProto')
+ ->repeated('extension', \Google\Protobuf\Internal\GPBType::MESSAGE, 7, 'google.protobuf.internal.FieldDescriptorProto')
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.FileOptions')
+ ->optional('source_code_info', \Google\Protobuf\Internal\GPBType::MESSAGE, 9, 'google.protobuf.internal.SourceCodeInfo')
+ ->optional('syntax', \Google\Protobuf\Internal\GPBType::STRING, 12)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.DescriptorProto', \Google\Protobuf\Internal\DescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->repeated('field', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.FieldDescriptorProto')
+ ->repeated('extension', \Google\Protobuf\Internal\GPBType::MESSAGE, 6, 'google.protobuf.internal.FieldDescriptorProto')
+ ->repeated('nested_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.DescriptorProto')
+ ->repeated('enum_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.EnumDescriptorProto')
+ ->repeated('extension_range', \Google\Protobuf\Internal\GPBType::MESSAGE, 5, 'google.protobuf.internal.DescriptorProto.ExtensionRange')
+ ->repeated('oneof_decl', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.OneofDescriptorProto')
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 7, 'google.protobuf.internal.MessageOptions')
+ ->repeated('reserved_range', \Google\Protobuf\Internal\GPBType::MESSAGE, 9, 'google.protobuf.internal.DescriptorProto.ReservedRange')
+ ->repeated('reserved_name', \Google\Protobuf\Internal\GPBType::STRING, 10)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.DescriptorProto.ExtensionRange', \Google\Protobuf\Internal\DescriptorProto\ExtensionRange::class)
+ ->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.ExtensionRangeOptions')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.DescriptorProto.ReservedRange', \Google\Protobuf\Internal\DescriptorProto\ReservedRange::class)
+ ->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.ExtensionRangeOptions', \Google\Protobuf\Internal\ExtensionRangeOptions::class)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.FieldDescriptorProto', \Google\Protobuf\Internal\FieldDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('number', \Google\Protobuf\Internal\GPBType::INT32, 3)
+ ->optional('label', \Google\Protobuf\Internal\GPBType::ENUM, 4, 'google.protobuf.internal.FieldDescriptorProto.Label')
+ ->optional('type', \Google\Protobuf\Internal\GPBType::ENUM, 5, 'google.protobuf.internal.FieldDescriptorProto.Type')
+ ->optional('type_name', \Google\Protobuf\Internal\GPBType::STRING, 6)
+ ->optional('extendee', \Google\Protobuf\Internal\GPBType::STRING, 2)
+ ->optional('default_value', \Google\Protobuf\Internal\GPBType::STRING, 7)
+ ->optional('oneof_index', \Google\Protobuf\Internal\GPBType::INT32, 9)
+ ->optional('json_name', \Google\Protobuf\Internal\GPBType::STRING, 10)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.FieldOptions')
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FieldDescriptorProto.Type', \Google\Protobuf\Internal\Type::class)
+ ->value("TYPE_DOUBLE", 1)
+ ->value("TYPE_FLOAT", 2)
+ ->value("TYPE_INT64", 3)
+ ->value("TYPE_UINT64", 4)
+ ->value("TYPE_INT32", 5)
+ ->value("TYPE_FIXED64", 6)
+ ->value("TYPE_FIXED32", 7)
+ ->value("TYPE_BOOL", 8)
+ ->value("TYPE_STRING", 9)
+ ->value("TYPE_GROUP", 10)
+ ->value("TYPE_MESSAGE", 11)
+ ->value("TYPE_BYTES", 12)
+ ->value("TYPE_UINT32", 13)
+ ->value("TYPE_ENUM", 14)
+ ->value("TYPE_SFIXED32", 15)
+ ->value("TYPE_SFIXED64", 16)
+ ->value("TYPE_SINT32", 17)
+ ->value("TYPE_SINT64", 18)
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FieldDescriptorProto.Label', \Google\Protobuf\Internal\Label::class)
+ ->value("LABEL_OPTIONAL", 1)
+ ->value("LABEL_REQUIRED", 2)
+ ->value("LABEL_REPEATED", 3)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.OneofDescriptorProto', \Google\Protobuf\Internal\OneofDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.OneofOptions')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumDescriptorProto', \Google\Protobuf\Internal\EnumDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->repeated('value', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.EnumValueDescriptorProto')
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.EnumOptions')
+ ->repeated('reserved_range', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.EnumDescriptorProto.EnumReservedRange')
+ ->repeated('reserved_name', \Google\Protobuf\Internal\GPBType::STRING, 5)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumDescriptorProto.EnumReservedRange', \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange::class)
+ ->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumValueDescriptorProto', \Google\Protobuf\Internal\EnumValueDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('number', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.EnumValueOptions')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.ServiceDescriptorProto', \Google\Protobuf\Internal\ServiceDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->repeated('method', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.MethodDescriptorProto')
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.ServiceOptions')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.MethodDescriptorProto', \Google\Protobuf\Internal\MethodDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('input_type', \Google\Protobuf\Internal\GPBType::STRING, 2)
+ ->optional('output_type', \Google\Protobuf\Internal\GPBType::STRING, 3)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.MethodOptions')
+ ->optional('client_streaming', \Google\Protobuf\Internal\GPBType::BOOL, 5)
+ ->optional('server_streaming', \Google\Protobuf\Internal\GPBType::BOOL, 6)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.FileOptions', \Google\Protobuf\Internal\FileOptions::class)
+ ->optional('java_package', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('java_outer_classname', \Google\Protobuf\Internal\GPBType::STRING, 8)
+ ->optional('java_multiple_files', \Google\Protobuf\Internal\GPBType::BOOL, 10)
+ ->optional('java_generate_equals_and_hash', \Google\Protobuf\Internal\GPBType::BOOL, 20)
+ ->optional('java_string_check_utf8', \Google\Protobuf\Internal\GPBType::BOOL, 27)
+ ->optional('optimize_for', \Google\Protobuf\Internal\GPBType::ENUM, 9, 'google.protobuf.internal.FileOptions.OptimizeMode')
+ ->optional('go_package', \Google\Protobuf\Internal\GPBType::STRING, 11)
+ ->optional('cc_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 16)
+ ->optional('java_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 17)
+ ->optional('py_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 18)
+ ->optional('php_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 42)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 23)
+ ->optional('cc_enable_arenas', \Google\Protobuf\Internal\GPBType::BOOL, 31)
+ ->optional('objc_class_prefix', \Google\Protobuf\Internal\GPBType::STRING, 36)
+ ->optional('csharp_namespace', \Google\Protobuf\Internal\GPBType::STRING, 37)
+ ->optional('swift_prefix', \Google\Protobuf\Internal\GPBType::STRING, 39)
+ ->optional('php_class_prefix', \Google\Protobuf\Internal\GPBType::STRING, 40)
+ ->optional('php_namespace', \Google\Protobuf\Internal\GPBType::STRING, 41)
+ ->optional('php_metadata_namespace', \Google\Protobuf\Internal\GPBType::STRING, 44)
+ ->optional('ruby_package', \Google\Protobuf\Internal\GPBType::STRING, 45)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FileOptions.OptimizeMode', \Google\Protobuf\Internal\OptimizeMode::class)
+ ->value("SPEED", 1)
+ ->value("CODE_SIZE", 2)
+ ->value("LITE_RUNTIME", 3)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.MessageOptions', \Google\Protobuf\Internal\MessageOptions::class)
+ ->optional('message_set_wire_format', \Google\Protobuf\Internal\GPBType::BOOL, 1)
+ ->optional('no_standard_descriptor_accessor', \Google\Protobuf\Internal\GPBType::BOOL, 2)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
+ ->optional('map_entry', \Google\Protobuf\Internal\GPBType::BOOL, 7)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.FieldOptions', \Google\Protobuf\Internal\FieldOptions::class)
+ ->optional('ctype', \Google\Protobuf\Internal\GPBType::ENUM, 1, 'google.protobuf.internal.FieldOptions.CType')
+ ->optional('packed', \Google\Protobuf\Internal\GPBType::BOOL, 2)
+ ->optional('jstype', \Google\Protobuf\Internal\GPBType::ENUM, 6, 'google.protobuf.internal.FieldOptions.JSType')
+ ->optional('lazy', \Google\Protobuf\Internal\GPBType::BOOL, 5)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
+ ->optional('weak', \Google\Protobuf\Internal\GPBType::BOOL, 10)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FieldOptions.CType', \Google\Protobuf\Internal\CType::class)
+ ->value("STRING", 0)
+ ->value("CORD", 1)
+ ->value("STRING_PIECE", 2)
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FieldOptions.JSType', \Google\Protobuf\Internal\JSType::class)
+ ->value("JS_NORMAL", 0)
+ ->value("JS_STRING", 1)
+ ->value("JS_NUMBER", 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.OneofOptions', \Google\Protobuf\Internal\OneofOptions::class)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumOptions', \Google\Protobuf\Internal\EnumOptions::class)
+ ->optional('allow_alias', \Google\Protobuf\Internal\GPBType::BOOL, 2)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumValueOptions', \Google\Protobuf\Internal\EnumValueOptions::class)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 1)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.ServiceOptions', \Google\Protobuf\Internal\ServiceOptions::class)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 33)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.MethodOptions', \Google\Protobuf\Internal\MethodOptions::class)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 33)
+ ->optional('idempotency_level', \Google\Protobuf\Internal\GPBType::ENUM, 34, 'google.protobuf.internal.MethodOptions.IdempotencyLevel')
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.MethodOptions.IdempotencyLevel', \Google\Protobuf\Internal\IdempotencyLevel::class)
+ ->value("IDEMPOTENCY_UNKNOWN", 0)
+ ->value("NO_SIDE_EFFECTS", 1)
+ ->value("IDEMPOTENT", 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.UninterpretedOption', \Google\Protobuf\Internal\UninterpretedOption::class)
+ ->repeated('name', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.UninterpretedOption.NamePart')
+ ->optional('identifier_value', \Google\Protobuf\Internal\GPBType::STRING, 3)
+ ->optional('positive_int_value', \Google\Protobuf\Internal\GPBType::UINT64, 4)
+ ->optional('negative_int_value', \Google\Protobuf\Internal\GPBType::INT64, 5)
+ ->optional('double_value', \Google\Protobuf\Internal\GPBType::DOUBLE, 6)
+ ->optional('string_value', \Google\Protobuf\Internal\GPBType::BYTES, 7)
+ ->optional('aggregate_value', \Google\Protobuf\Internal\GPBType::STRING, 8)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.UninterpretedOption.NamePart', \Google\Protobuf\Internal\UninterpretedOption\NamePart::class)
+ ->required('name_part', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->required('is_extension', \Google\Protobuf\Internal\GPBType::BOOL, 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.SourceCodeInfo', \Google\Protobuf\Internal\SourceCodeInfo::class)
+ ->repeated('location', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.SourceCodeInfo.Location')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.SourceCodeInfo.Location', \Google\Protobuf\Internal\SourceCodeInfo\Location::class)
+ ->repeated('path', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->repeated('span', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->optional('leading_comments', \Google\Protobuf\Internal\GPBType::STRING, 3)
+ ->optional('trailing_comments', \Google\Protobuf\Internal\GPBType::STRING, 4)
+ ->repeated('leading_detached_comments', \Google\Protobuf\Internal\GPBType::STRING, 6)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.GeneratedCodeInfo', \Google\Protobuf\Internal\GeneratedCodeInfo::class)
+ ->repeated('annotation', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.GeneratedCodeInfo.Annotation')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.GeneratedCodeInfo.Annotation', \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation::class)
+ ->repeated('path', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->optional('source_file', \Google\Protobuf\Internal\GPBType::STRING, 2)
+ ->optional('begin', \Google\Protobuf\Internal\GPBType::INT32, 3)
+ ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 4)
+ ->finalizeToPool();
+
+ $pool->finish();
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/SourceContext.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/SourceContext.php
new file mode 100644
index 0000000..495c6de
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/SourceContext.php
@@ -0,0 +1,32 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/source_context.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class SourceContext
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->internalAddGeneratedFile(hex2bin(
+ "0afb010a24676f6f676c652f70726f746f6275662f736f757263655f636f" .
+ "6e746578742e70726f746f120f676f6f676c652e70726f746f6275662222" .
+ "0a0d536f75726365436f6e7465787412110a0966696c655f6e616d651801" .
+ "200128094295010a13636f6d2e676f6f676c652e70726f746f6275664212" .
+ "536f75726365436f6e7465787450726f746f50015a41676f6f676c652e67" .
+ "6f6c616e672e6f72672f67656e70726f746f2f70726f746f6275662f736f" .
+ "757263655f636f6e746578743b736f757263655f636f6e74657874a20203" .
+ "475042aa021e476f6f676c652e50726f746f6275662e57656c6c4b6e6f77" .
+ "6e5479706573620670726f746f33"
+ ));
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Struct.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Struct.php
new file mode 100644
index 0000000..96b42af
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Struct.php
@@ -0,0 +1,45 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/struct.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class Struct
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->internalAddGeneratedFile(hex2bin(
+ "0a81050a1c676f6f676c652f70726f746f6275662f7374727563742e7072" .
+ "6f746f120f676f6f676c652e70726f746f6275662284010a065374727563" .
+ "7412330a066669656c647318012003280b32232e676f6f676c652e70726f" .
+ "746f6275662e5374727563742e4669656c6473456e7472791a450a0b4669" .
+ "656c6473456e747279120b0a036b657918012001280912250a0576616c75" .
+ "6518022001280b32162e676f6f676c652e70726f746f6275662e56616c75" .
+ "653a02380122ea010a0556616c756512300a0a6e756c6c5f76616c756518" .
+ "012001280e321a2e676f6f676c652e70726f746f6275662e4e756c6c5661" .
+ "6c7565480012160a0c6e756d6265725f76616c7565180220012801480012" .
+ "160a0c737472696e675f76616c7565180320012809480012140a0a626f6f" .
+ "6c5f76616c75651804200128084800122f0a0c7374727563745f76616c75" .
+ "6518052001280b32172e676f6f676c652e70726f746f6275662e53747275" .
+ "6374480012300a0a6c6973745f76616c756518062001280b321a2e676f6f" .
+ "676c652e70726f746f6275662e4c69737456616c7565480042060a046b69" .
+ "6e6422330a094c69737456616c756512260a0676616c7565731801200328" .
+ "0b32162e676f6f676c652e70726f746f6275662e56616c75652a1b0a094e" .
+ "756c6c56616c7565120e0a0a4e554c4c5f56414c554510004281010a1363" .
+ "6f6d2e676f6f676c652e70726f746f627566420b53747275637450726f74" .
+ "6f50015a316769746875622e636f6d2f676f6c616e672f70726f746f6275" .
+ "662f7074797065732f7374727563743b7374727563747062f80101a20203" .
+ "475042aa021e476f6f676c652e50726f746f6275662e57656c6c4b6e6f77" .
+ "6e5479706573620670726f746f33"
+ ));
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Timestamp.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Timestamp.php
new file mode 100644
index 0000000..373665c
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Timestamp.php
@@ -0,0 +1,31 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/timestamp.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class Timestamp
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->internalAddGeneratedFile(hex2bin(
+ "0ae7010a1f676f6f676c652f70726f746f6275662f74696d657374616d70" .
+ "2e70726f746f120f676f6f676c652e70726f746f627566222b0a0954696d" .
+ "657374616d70120f0a077365636f6e6473180120012803120d0a056e616e" .
+ "6f73180220012805427e0a13636f6d2e676f6f676c652e70726f746f6275" .
+ "66420e54696d657374616d7050726f746f50015a2b6769746875622e636f" .
+ "6d2f676f6c616e672f70726f746f6275662f7074797065732f74696d6573" .
+ "74616d70f80101a20203475042aa021e476f6f676c652e50726f746f6275" .
+ "662e57656c6c4b6e6f776e5479706573620670726f746f33"
+ ));
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Type.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Type.php
new file mode 100644
index 0000000..8fbe8cb
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Type.php
@@ -0,0 +1,78 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class Type
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ \GPBMetadata\Google\Protobuf\Any::initOnce();
+ \GPBMetadata\Google\Protobuf\SourceContext::initOnce();
+ $pool->internalAddGeneratedFile(hex2bin(
+ "0a9f0c0a1a676f6f676c652f70726f746f6275662f747970652e70726f74" .
+ "6f120f676f6f676c652e70726f746f6275661a24676f6f676c652f70726f" .
+ "746f6275662f736f757263655f636f6e746578742e70726f746f22d7010a" .
+ "0454797065120c0a046e616d6518012001280912260a066669656c647318" .
+ "022003280b32162e676f6f676c652e70726f746f6275662e4669656c6412" .
+ "0e0a066f6e656f667318032003280912280a076f7074696f6e7318042003" .
+ "280b32172e676f6f676c652e70726f746f6275662e4f7074696f6e12360a" .
+ "0e736f757263655f636f6e7465787418052001280b321e2e676f6f676c65" .
+ "2e70726f746f6275662e536f75726365436f6e7465787412270a0673796e" .
+ "74617818062001280e32172e676f6f676c652e70726f746f6275662e5379" .
+ "6e74617822d5050a054669656c6412290a046b696e6418012001280e321b" .
+ "2e676f6f676c652e70726f746f6275662e4669656c642e4b696e6412370a" .
+ "0b63617264696e616c69747918022001280e32222e676f6f676c652e7072" .
+ "6f746f6275662e4669656c642e43617264696e616c697479120e0a066e75" .
+ "6d626572180320012805120c0a046e616d6518042001280912100a087479" .
+ "70655f75726c18062001280912130a0b6f6e656f665f696e646578180720" .
+ "012805120e0a067061636b656418082001280812280a076f7074696f6e73" .
+ "18092003280b32172e676f6f676c652e70726f746f6275662e4f7074696f" .
+ "6e12110a096a736f6e5f6e616d65180a2001280912150a0d64656661756c" .
+ "745f76616c7565180b2001280922c8020a044b696e6412100a0c54595045" .
+ "5f554e4b4e4f574e1000120f0a0b545950455f444f55424c451001120e0a" .
+ "0a545950455f464c4f41541002120e0a0a545950455f494e543634100312" .
+ "0f0a0b545950455f55494e5436341004120e0a0a545950455f494e543332" .
+ "100512100a0c545950455f46495845443634100612100a0c545950455f46" .
+ "4958454433321007120d0a09545950455f424f4f4c1008120f0a0b545950" .
+ "455f535452494e471009120e0a0a545950455f47524f5550100a12100a0c" .
+ "545950455f4d455353414745100b120e0a0a545950455f4259544553100c" .
+ "120f0a0b545950455f55494e543332100d120d0a09545950455f454e554d" .
+ "100e12110a0d545950455f5346495845443332100f12110a0d545950455f" .
+ "53464958454436341010120f0a0b545950455f53494e5433321011120f0a" .
+ "0b545950455f53494e543634101222740a0b43617264696e616c69747912" .
+ "170a1343415244494e414c4954595f554e4b4e4f574e100012180a144341" .
+ "5244494e414c4954595f4f5054494f4e414c100112180a1443415244494e" .
+ "414c4954595f5245515549524544100212180a1443415244494e414c4954" .
+ "595f5245504541544544100322ce010a04456e756d120c0a046e616d6518" .
+ "0120012809122d0a09656e756d76616c756518022003280b321a2e676f6f" .
+ "676c652e70726f746f6275662e456e756d56616c756512280a076f707469" .
+ "6f6e7318032003280b32172e676f6f676c652e70726f746f6275662e4f70" .
+ "74696f6e12360a0e736f757263655f636f6e7465787418042001280b321e" .
+ "2e676f6f676c652e70726f746f6275662e536f75726365436f6e74657874" .
+ "12270a0673796e74617818052001280e32172e676f6f676c652e70726f74" .
+ "6f6275662e53796e74617822530a09456e756d56616c7565120c0a046e61" .
+ "6d65180120012809120e0a066e756d62657218022001280512280a076f70" .
+ "74696f6e7318032003280b32172e676f6f676c652e70726f746f6275662e" .
+ "4f7074696f6e223b0a064f7074696f6e120c0a046e616d65180120012809" .
+ "12230a0576616c756518022001280b32142e676f6f676c652e70726f746f" .
+ "6275662e416e792a2e0a0653796e74617812110a0d53594e5441585f5052" .
+ "4f544f32100012110a0d53594e5441585f50524f544f331001427d0a1363" .
+ "6f6d2e676f6f676c652e70726f746f62756642095479706550726f746f50" .
+ "015a2f676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f" .
+ "70726f746f6275662f70747970653b7074797065f80101a20203475042aa" .
+ "021e476f6f676c652e50726f746f6275662e57656c6c4b6e6f776e547970" .
+ "6573620670726f746f33"
+ ));
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Wrappers.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Wrappers.php
new file mode 100644
index 0000000..dd72ff4
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Wrappers.php
@@ -0,0 +1,38 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class Wrappers
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->internalAddGeneratedFile(hex2bin(
+ "0abf030a1e676f6f676c652f70726f746f6275662f77726170706572732e" .
+ "70726f746f120f676f6f676c652e70726f746f627566221c0a0b446f7562" .
+ "6c6556616c7565120d0a0576616c7565180120012801221b0a0a466c6f61" .
+ "7456616c7565120d0a0576616c7565180120012802221b0a0a496e743634" .
+ "56616c7565120d0a0576616c7565180120012803221c0a0b55496e743634" .
+ "56616c7565120d0a0576616c7565180120012804221b0a0a496e74333256" .
+ "616c7565120d0a0576616c7565180120012805221c0a0b55496e74333256" .
+ "616c7565120d0a0576616c756518012001280d221a0a09426f6f6c56616c" .
+ "7565120d0a0576616c7565180120012808221c0a0b537472696e6756616c" .
+ "7565120d0a0576616c7565180120012809221b0a0a427974657356616c75" .
+ "65120d0a0576616c756518012001280c427c0a13636f6d2e676f6f676c65" .
+ "2e70726f746f627566420d577261707065727350726f746f50015a2a6769" .
+ "746875622e636f6d2f676f6c616e672f70726f746f6275662f7074797065" .
+ "732f7772617070657273f80101a20203475042aa021e476f6f676c652e50" .
+ "726f746f6275662e57656c6c4b6e6f776e5479706573620670726f746f33"
+ ));
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Any.php b/vendor/google/protobuf/src/Google/Protobuf/Any.php
new file mode 100644
index 0000000..cdbaa25
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Any.php
@@ -0,0 +1,325 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/any.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\Message;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * `Any` contains an arbitrary serialized protocol buffer message along with a
+ * URL that describes the type of the serialized message.
+ * Protobuf library provides support to pack/unpack Any values in the form
+ * of utility functions or additional generated methods of the Any type.
+ * Example 1: Pack and unpack a message in C++.
+ * Foo foo = ...;
+ * Any any;
+ * any.PackFrom(foo);
+ * ...
+ * if (any.UnpackTo(&foo)) {
+ * ...
+ * }
+ * Example 2: Pack and unpack a message in Java.
+ * Foo foo = ...;
+ * Any any = Any.pack(foo);
+ * ...
+ * if (any.is(Foo.class)) {
+ * foo = any.unpack(Foo.class);
+ * }
+ * Example 3: Pack and unpack a message in Python.
+ * foo = Foo(...)
+ * any = Any()
+ * any.Pack(foo)
+ * ...
+ * if any.Is(Foo.DESCRIPTOR):
+ * any.Unpack(foo)
+ * ...
+ * Example 4: Pack and unpack a message in Go
+ * foo := &pb.Foo{...}
+ * any, err := ptypes.MarshalAny(foo)
+ * ...
+ * foo := &pb.Foo{}
+ * if err := ptypes.UnmarshalAny(any, foo); err != nil {
+ * ...
+ * }
+ * The pack methods provided by protobuf library will by default use
+ * 'type.googleapis.com/full.type.name' as the type URL and the unpack
+ * methods only use the fully qualified type name after the last '/'
+ * in the type URL, for example "foo.bar.com/x/y.z" will yield type
+ * name "y.z".
+ * JSON
+ * ====
+ * The JSON representation of an `Any` value uses the regular
+ * representation of the deserialized, embedded message, with an
+ * additional field `@type` which contains the type URL. Example:
+ * package google.profile;
+ * message Person {
+ * string first_name = 1;
+ * string last_name = 2;
+ * }
+ * {
+ * "@type": "type.googleapis.com/google.profile.Person",
+ * "firstName": <string>,
+ * "lastName": <string>
+ * }
+ * If the embedded message type is well-known and has a custom JSON
+ * representation, that representation will be embedded adding a field
+ * `value` which holds the custom JSON in addition to the `@type`
+ * field. Example (for message [google.protobuf.Duration][]):
+ * {
+ * "@type": "type.googleapis.com/google.protobuf.Duration",
+ * "value": "1.212s"
+ * }
+ *
+ * Generated from protobuf message <code>google.protobuf.Any</code>
+ */
+class Any extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A URL/resource name that uniquely identifies the type of the serialized
+ * protocol buffer message. The last segment of the URL's path must represent
+ * the fully qualified name of the type (as in
+ * `path/google.protobuf.Duration`). The name should be in a canonical form
+ * (e.g., leading "." is not accepted).
+ * In practice, teams usually precompile into the binary all types that they
+ * expect it to use in the context of Any. However, for URLs which use the
+ * scheme `http`, `https`, or no scheme, one can optionally set up a type
+ * server that maps type URLs to message definitions as follows:
+ * * If no scheme is provided, `https` is assumed.
+ * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+ * value in binary format, or produce an error.
+ * * Applications are allowed to cache lookup results based on the
+ * URL, or have them precompiled into a binary to avoid any
+ * lookup. Therefore, binary compatibility needs to be preserved
+ * on changes to types. (Use versioned type names to manage
+ * breaking changes.)
+ * Note: this functionality is not currently available in the official
+ * protobuf release, and it is not used for type URLs beginning with
+ * type.googleapis.com.
+ * Schemes other than `http`, `https` (or the empty scheme) might be
+ * used with implementation specific semantics.
+ *
+ * Generated from protobuf field <code>string type_url = 1;</code>
+ */
+ private $type_url = '';
+ /**
+ * Must be a valid serialized protocol buffer of the above specified type.
+ *
+ * Generated from protobuf field <code>bytes value = 2;</code>
+ */
+ private $value = '';
+
+ const TYPE_URL_PREFIX = 'type.googleapis.com/';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $type_url
+ * A URL/resource name that uniquely identifies the type of the serialized
+ * protocol buffer message. The last segment of the URL's path must represent
+ * the fully qualified name of the type (as in
+ * `path/google.protobuf.Duration`). The name should be in a canonical form
+ * (e.g., leading "." is not accepted).
+ * In practice, teams usually precompile into the binary all types that they
+ * expect it to use in the context of Any. However, for URLs which use the
+ * scheme `http`, `https`, or no scheme, one can optionally set up a type
+ * server that maps type URLs to message definitions as follows:
+ * * If no scheme is provided, `https` is assumed.
+ * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+ * value in binary format, or produce an error.
+ * * Applications are allowed to cache lookup results based on the
+ * URL, or have them precompiled into a binary to avoid any
+ * lookup. Therefore, binary compatibility needs to be preserved
+ * on changes to types. (Use versioned type names to manage
+ * breaking changes.)
+ * Note: this functionality is not currently available in the official
+ * protobuf release, and it is not used for type URLs beginning with
+ * type.googleapis.com.
+ * Schemes other than `http`, `https` (or the empty scheme) might be
+ * used with implementation specific semantics.
+ * @type string $value
+ * Must be a valid serialized protocol buffer of the above specified type.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Any::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A URL/resource name that uniquely identifies the type of the serialized
+ * protocol buffer message. The last segment of the URL's path must represent
+ * the fully qualified name of the type (as in
+ * `path/google.protobuf.Duration`). The name should be in a canonical form
+ * (e.g., leading "." is not accepted).
+ * In practice, teams usually precompile into the binary all types that they
+ * expect it to use in the context of Any. However, for URLs which use the
+ * scheme `http`, `https`, or no scheme, one can optionally set up a type
+ * server that maps type URLs to message definitions as follows:
+ * * If no scheme is provided, `https` is assumed.
+ * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+ * value in binary format, or produce an error.
+ * * Applications are allowed to cache lookup results based on the
+ * URL, or have them precompiled into a binary to avoid any
+ * lookup. Therefore, binary compatibility needs to be preserved
+ * on changes to types. (Use versioned type names to manage
+ * breaking changes.)
+ * Note: this functionality is not currently available in the official
+ * protobuf release, and it is not used for type URLs beginning with
+ * type.googleapis.com.
+ * Schemes other than `http`, `https` (or the empty scheme) might be
+ * used with implementation specific semantics.
+ *
+ * Generated from protobuf field <code>string type_url = 1;</code>
+ * @return string
+ */
+ public function getTypeUrl()
+ {
+ return $this->type_url;
+ }
+
+ /**
+ * A URL/resource name that uniquely identifies the type of the serialized
+ * protocol buffer message. The last segment of the URL's path must represent
+ * the fully qualified name of the type (as in
+ * `path/google.protobuf.Duration`). The name should be in a canonical form
+ * (e.g., leading "." is not accepted).
+ * In practice, teams usually precompile into the binary all types that they
+ * expect it to use in the context of Any. However, for URLs which use the
+ * scheme `http`, `https`, or no scheme, one can optionally set up a type
+ * server that maps type URLs to message definitions as follows:
+ * * If no scheme is provided, `https` is assumed.
+ * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+ * value in binary format, or produce an error.
+ * * Applications are allowed to cache lookup results based on the
+ * URL, or have them precompiled into a binary to avoid any
+ * lookup. Therefore, binary compatibility needs to be preserved
+ * on changes to types. (Use versioned type names to manage
+ * breaking changes.)
+ * Note: this functionality is not currently available in the official
+ * protobuf release, and it is not used for type URLs beginning with
+ * type.googleapis.com.
+ * Schemes other than `http`, `https` (or the empty scheme) might be
+ * used with implementation specific semantics.
+ *
+ * Generated from protobuf field <code>string type_url = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTypeUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * Must be a valid serialized protocol buffer of the above specified type.
+ *
+ * Generated from protobuf field <code>bytes value = 2;</code>
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Must be a valid serialized protocol buffer of the above specified type.
+ *
+ * Generated from protobuf field <code>bytes value = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->value = $var;
+
+ return $this;
+ }
+
+ /**
+ * This method will try to resolve the type_url in Any message to get the
+ * targeted message type. If failed, an error will be thrown. Otherwise,
+ * the method will create a message of the targeted type and fill it with
+ * the decoded value in Any.
+ * @return unpacked message
+ * @throws \Exception Type url needs to be type.googleapis.com/fully-qulified.
+ * @throws \Exception Class hasn't been added to descriptor pool.
+ * @throws \Exception cannot decode data in value field.
+ */
+ public function unpack()
+ {
+ // Get fully qualifed name from type url.
+ $url_prifix_len = strlen(GPBUtil::TYPE_URL_PREFIX);
+ if (substr($this->type_url, 0, $url_prifix_len) !=
+ GPBUtil::TYPE_URL_PREFIX) {
+ throw new \Exception(
+ "Type url needs to be type.googleapis.com/fully-qulified");
+ }
+ $fully_qualifed_name =
+ substr($this->type_url, $url_prifix_len);
+
+ // Create message according to fully qualified name.
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+ $desc = $pool->getDescriptorByProtoName( ".".$fully_qualifed_name);
+ if (is_null($desc)) {
+ throw new \Exception("Class ".$fully_qualifed_name
+ ." hasn't been added to descriptor pool");
+ }
+ $klass = $desc->getClass();
+ $msg = new $klass();
+
+ // Merge data into message.
+ $msg->mergeFromString($this->value);
+ return $msg;
+ }
+
+ /**
+ * The type_url will be created according to the given message’s type and
+ * the value is encoded data from the given message..
+ * @param message: A proto message.
+ */
+ public function pack($msg)
+ {
+ if (!$msg instanceof Message) {
+ trigger_error("Given parameter is not a message instance.",
+ E_USER_ERROR);
+ return;
+ }
+
+ // Set value using serialzed message.
+ $this->value = $msg->serializeToString();
+
+ // Set type url.
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+ $desc = $pool->getDescriptorByClassName(get_class($msg));
+ $fully_qualifed_name = $desc->getFullName();
+ $this->type_url = GPBUtil::TYPE_URL_PREFIX.substr(
+ $fully_qualifed_name, 1, strlen($fully_qualifed_name));
+ }
+
+ /**
+ * This method returns whether the type_url in any_message is corresponded
+ * to the given class.
+ * @param klass: The fully qualified PHP class name of a proto message type.
+ */
+ public function is($klass)
+ {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+ $desc = $pool->getDescriptorByClassName($klass);
+ $fully_qualifed_name = $desc->getFullName();
+ $type_url = GPBUtil::TYPE_URL_PREFIX.substr(
+ $fully_qualifed_name, 1, strlen($fully_qualifed_name));
+ return $this->type_url === $type_url;
+ }
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Api.php b/vendor/google/protobuf/src/Google/Protobuf/Api.php
new file mode 100644
index 0000000..db37ffb
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Api.php
@@ -0,0 +1,350 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/api.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Api is a light-weight descriptor for an API Interface.
+ * Interfaces are also described as "protocol buffer services" in some contexts,
+ * such as by the "service" keyword in a .proto file, but they are different
+ * from API Services, which represent a concrete implementation of an interface
+ * as opposed to simply a description of methods and bindings. They are also
+ * sometimes simply referred to as "APIs" in other contexts, such as the name of
+ * this message itself. See https://cloud.google.com/apis/design/glossary for
+ * detailed terminology.
+ *
+ * Generated from protobuf message <code>google.protobuf.Api</code>
+ */
+class Api extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The fully qualified name of this interface, including package name
+ * followed by the interface's simple name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ private $name = '';
+ /**
+ * The methods of this interface, in unspecified order.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code>
+ */
+ private $methods;
+ /**
+ * Any metadata attached to the interface.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ */
+ private $options;
+ /**
+ * A version string for this interface. If specified, must have the form
+ * `major-version.minor-version`, as in `1.10`. If the minor version is
+ * omitted, it defaults to zero. If the entire version field is empty, the
+ * major version is derived from the package name, as outlined below. If the
+ * field is not empty, the version in the package name will be verified to be
+ * consistent with what is provided here.
+ * The versioning schema uses [semantic
+ * versioning](http://semver.org) where the major version number
+ * indicates a breaking change and the minor version an additive,
+ * non-breaking change. Both version numbers are signals to users
+ * what to expect from different versions, and should be carefully
+ * chosen based on the product plan.
+ * The major version is also reflected in the package name of the
+ * interface, which must end in `v<major-version>`, as in
+ * `google.feature.v1`. For major versions 0 and 1, the suffix can
+ * be omitted. Zero major versions must only be used for
+ * experimental, non-GA interfaces.
+ *
+ * Generated from protobuf field <code>string version = 4;</code>
+ */
+ private $version = '';
+ /**
+ * Source context for the protocol buffer service represented by this
+ * message.
+ *
+ * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
+ */
+ private $source_context = null;
+ /**
+ * Included interfaces. See [Mixin][].
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code>
+ */
+ private $mixins;
+ /**
+ * The source syntax of the service.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
+ */
+ private $syntax = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The fully qualified name of this interface, including package name
+ * followed by the interface's simple name.
+ * @type \Google\Protobuf\Method[]|\Google\Protobuf\Internal\RepeatedField $methods
+ * The methods of this interface, in unspecified order.
+ * @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options
+ * Any metadata attached to the interface.
+ * @type string $version
+ * A version string for this interface. If specified, must have the form
+ * `major-version.minor-version`, as in `1.10`. If the minor version is
+ * omitted, it defaults to zero. If the entire version field is empty, the
+ * major version is derived from the package name, as outlined below. If the
+ * field is not empty, the version in the package name will be verified to be
+ * consistent with what is provided here.
+ * The versioning schema uses [semantic
+ * versioning](http://semver.org) where the major version number
+ * indicates a breaking change and the minor version an additive,
+ * non-breaking change. Both version numbers are signals to users
+ * what to expect from different versions, and should be carefully
+ * chosen based on the product plan.
+ * The major version is also reflected in the package name of the
+ * interface, which must end in `v<major-version>`, as in
+ * `google.feature.v1`. For major versions 0 and 1, the suffix can
+ * be omitted. Zero major versions must only be used for
+ * experimental, non-GA interfaces.
+ * @type \Google\Protobuf\SourceContext $source_context
+ * Source context for the protocol buffer service represented by this
+ * message.
+ * @type \Google\Protobuf\Mixin[]|\Google\Protobuf\Internal\RepeatedField $mixins
+ * Included interfaces. See [Mixin][].
+ * @type int $syntax
+ * The source syntax of the service.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Api::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The fully qualified name of this interface, including package name
+ * followed by the interface's simple name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The fully qualified name of this interface, including package name
+ * followed by the interface's simple name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The methods of this interface, in unspecified order.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMethods()
+ {
+ return $this->methods;
+ }
+
+ /**
+ * The methods of this interface, in unspecified order.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code>
+ * @param \Google\Protobuf\Method[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMethods($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Method::class);
+ $this->methods = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Any metadata attached to the interface.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Any metadata attached to the interface.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
+ $this->options = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A version string for this interface. If specified, must have the form
+ * `major-version.minor-version`, as in `1.10`. If the minor version is
+ * omitted, it defaults to zero. If the entire version field is empty, the
+ * major version is derived from the package name, as outlined below. If the
+ * field is not empty, the version in the package name will be verified to be
+ * consistent with what is provided here.
+ * The versioning schema uses [semantic
+ * versioning](http://semver.org) where the major version number
+ * indicates a breaking change and the minor version an additive,
+ * non-breaking change. Both version numbers are signals to users
+ * what to expect from different versions, and should be carefully
+ * chosen based on the product plan.
+ * The major version is also reflected in the package name of the
+ * interface, which must end in `v<major-version>`, as in
+ * `google.feature.v1`. For major versions 0 and 1, the suffix can
+ * be omitted. Zero major versions must only be used for
+ * experimental, non-GA interfaces.
+ *
+ * Generated from protobuf field <code>string version = 4;</code>
+ * @return string
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * A version string for this interface. If specified, must have the form
+ * `major-version.minor-version`, as in `1.10`. If the minor version is
+ * omitted, it defaults to zero. If the entire version field is empty, the
+ * major version is derived from the package name, as outlined below. If the
+ * field is not empty, the version in the package name will be verified to be
+ * consistent with what is provided here.
+ * The versioning schema uses [semantic
+ * versioning](http://semver.org) where the major version number
+ * indicates a breaking change and the minor version an additive,
+ * non-breaking change. Both version numbers are signals to users
+ * what to expect from different versions, and should be carefully
+ * chosen based on the product plan.
+ * The major version is also reflected in the package name of the
+ * interface, which must end in `v<major-version>`, as in
+ * `google.feature.v1`. For major versions 0 and 1, the suffix can
+ * be omitted. Zero major versions must only be used for
+ * experimental, non-GA interfaces.
+ *
+ * Generated from protobuf field <code>string version = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setVersion($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->version = $var;
+
+ return $this;
+ }
+
+ /**
+ * Source context for the protocol buffer service represented by this
+ * message.
+ *
+ * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
+ * @return \Google\Protobuf\SourceContext
+ */
+ public function getSourceContext()
+ {
+ return $this->source_context;
+ }
+
+ /**
+ * Source context for the protocol buffer service represented by this
+ * message.
+ *
+ * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
+ * @param \Google\Protobuf\SourceContext $var
+ * @return $this
+ */
+ public function setSourceContext($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class);
+ $this->source_context = $var;
+
+ return $this;
+ }
+
+ /**
+ * Included interfaces. See [Mixin][].
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMixins()
+ {
+ return $this->mixins;
+ }
+
+ /**
+ * Included interfaces. See [Mixin][].
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code>
+ * @param \Google\Protobuf\Mixin[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMixins($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Mixin::class);
+ $this->mixins = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The source syntax of the service.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
+ * @return int
+ */
+ public function getSyntax()
+ {
+ return $this->syntax;
+ }
+
+ /**
+ * The source syntax of the service.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setSyntax($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
+ $this->syntax = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/BoolValue.php b/vendor/google/protobuf/src/Google/Protobuf/BoolValue.php
new file mode 100644
index 0000000..13872eb
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/BoolValue.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `bool`.
+ * The JSON representation for `BoolValue` is JSON `true` and `false`.
+ *
+ * Generated from protobuf message <code>google.protobuf.BoolValue</code>
+ */
+class BoolValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The bool value.
+ *
+ * Generated from protobuf field <code>bool value = 1;</code>
+ */
+ private $value = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $value
+ * The bool value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The bool value.
+ *
+ * Generated from protobuf field <code>bool value = 1;</code>
+ * @return bool
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The bool value.
+ *
+ * Generated from protobuf field <code>bool value = 1;</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/BytesValue.php b/vendor/google/protobuf/src/Google/Protobuf/BytesValue.php
new file mode 100644
index 0000000..f1b3817
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/BytesValue.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `bytes`.
+ * The JSON representation for `BytesValue` is JSON string.
+ *
+ * Generated from protobuf message <code>google.protobuf.BytesValue</code>
+ */
+class BytesValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The bytes value.
+ *
+ * Generated from protobuf field <code>bytes value = 1;</code>
+ */
+ private $value = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $value
+ * The bytes value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The bytes value.
+ *
+ * Generated from protobuf field <code>bytes value = 1;</code>
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The bytes value.
+ *
+ * Generated from protobuf field <code>bytes value = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Descriptor.php b/vendor/google/protobuf/src/Google/Protobuf/Descriptor.php
new file mode 100644
index 0000000..986b81e
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Descriptor.php
@@ -0,0 +1,100 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2017 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GetPublicDescriptorTrait;
+
+class Descriptor
+{
+ use GetPublicDescriptorTrait;
+
+ private $internal_desc;
+
+ /**
+ * @internal
+ */
+ public function __construct($internal_desc)
+ {
+ $this->internal_desc = $internal_desc;
+ }
+
+ /**
+ * @return string Full protobuf message name
+ */
+ public function getFullName()
+ {
+ return trim($this->internal_desc->getFullName(), ".");
+ }
+
+ /**
+ * @return string PHP class name
+ */
+ public function getClass()
+ {
+ return $this->internal_desc->getClass();
+ }
+
+ /**
+ * @param int $index Must be >= 0 and < getFieldCount()
+ * @return FieldDescriptor
+ */
+ public function getField($index)
+ {
+ return $this->getPublicDescriptor($this->internal_desc->getFieldByIndex($index));
+ }
+
+ /**
+ * @return int Number of fields in message
+ */
+ public function getFieldCount()
+ {
+ return count($this->internal_desc->getField());
+ }
+
+ /**
+ * @param int $index Must be >= 0 and < getOneofDeclCount()
+ * @return OneofDescriptor
+ */
+ public function getOneofDecl($index)
+ {
+ return $this->getPublicDescriptor($this->internal_desc->getOneofDecl()[$index]);
+ }
+
+ /**
+ * @return int Number of oneofs in message
+ */
+ public function getOneofDeclCount()
+ {
+ return count($this->internal_desc->getOneofDecl());
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/DescriptorPool.php b/vendor/google/protobuf/src/Google/Protobuf/DescriptorPool.php
new file mode 100644
index 0000000..119f0e2
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/DescriptorPool.php
@@ -0,0 +1,76 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2017 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+namespace Google\Protobuf;
+
+class DescriptorPool
+{
+ private static $pool;
+
+ private $internal_pool;
+
+ /**
+ * @return DescriptorPool
+ */
+ public static function getGeneratedPool()
+ {
+ if (!isset(self::$pool)) {
+ self::$pool = new DescriptorPool(\Google\Protobuf\Internal\DescriptorPool::getGeneratedPool());
+ }
+ return self::$pool;
+ }
+
+ private function __construct($internal_pool)
+ {
+ $this->internal_pool = $internal_pool;
+ }
+
+ /**
+ * @param string $className A fully qualified protobuf class name
+ * @return Descriptor
+ */
+ public function getDescriptorByClassName($className)
+ {
+ $desc = $this->internal_pool->getDescriptorByClassName($className);
+ return is_null($desc) ? null : $desc->getPublicDescriptor();
+ }
+
+ /**
+ * @param string $className A fully qualified protobuf class name
+ * @return EnumDescriptor
+ */
+ public function getEnumDescriptorByClassName($className)
+ {
+ $desc = $this->internal_pool->getEnumDescriptorByClassName($className);
+ return is_null($desc) ? null : $desc->getPublicDescriptor();
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/DoubleValue.php b/vendor/google/protobuf/src/Google/Protobuf/DoubleValue.php
new file mode 100644
index 0000000..236d918
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/DoubleValue.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `double`.
+ * The JSON representation for `DoubleValue` is JSON number.
+ *
+ * Generated from protobuf message <code>google.protobuf.DoubleValue</code>
+ */
+class DoubleValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The double value.
+ *
+ * Generated from protobuf field <code>double value = 1;</code>
+ */
+ private $value = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $value
+ * The double value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The double value.
+ *
+ * Generated from protobuf field <code>double value = 1;</code>
+ * @return float
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The double value.
+ *
+ * Generated from protobuf field <code>double value = 1;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Duration.php b/vendor/google/protobuf/src/Google/Protobuf/Duration.php
new file mode 100644
index 0000000..414a186
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Duration.php
@@ -0,0 +1,173 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/duration.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A Duration represents a signed, fixed-length span of time represented
+ * as a count of seconds and fractions of seconds at nanosecond
+ * resolution. It is independent of any calendar and concepts like "day"
+ * or "month". It is related to Timestamp in that the difference between
+ * two Timestamp values is a Duration and it can be added or subtracted
+ * from a Timestamp. Range is approximately +-10,000 years.
+ * # Examples
+ * Example 1: Compute Duration from two Timestamps in pseudo code.
+ * Timestamp start = ...;
+ * Timestamp end = ...;
+ * Duration duration = ...;
+ * duration.seconds = end.seconds - start.seconds;
+ * duration.nanos = end.nanos - start.nanos;
+ * if (duration.seconds < 0 && duration.nanos > 0) {
+ * duration.seconds += 1;
+ * duration.nanos -= 1000000000;
+ * } else if (durations.seconds > 0 && duration.nanos < 0) {
+ * duration.seconds -= 1;
+ * duration.nanos += 1000000000;
+ * }
+ * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
+ * Timestamp start = ...;
+ * Duration duration = ...;
+ * Timestamp end = ...;
+ * end.seconds = start.seconds + duration.seconds;
+ * end.nanos = start.nanos + duration.nanos;
+ * if (end.nanos < 0) {
+ * end.seconds -= 1;
+ * end.nanos += 1000000000;
+ * } else if (end.nanos >= 1000000000) {
+ * end.seconds += 1;
+ * end.nanos -= 1000000000;
+ * }
+ * Example 3: Compute Duration from datetime.timedelta in Python.
+ * td = datetime.timedelta(days=3, minutes=10)
+ * duration = Duration()
+ * duration.FromTimedelta(td)
+ * # JSON Mapping
+ * In JSON format, the Duration type is encoded as a string rather than an
+ * object, where the string ends in the suffix "s" (indicating seconds) and
+ * is preceded by the number of seconds, with nanoseconds expressed as
+ * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
+ * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
+ * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
+ * microsecond should be expressed in JSON format as "3.000001s".
+ *
+ * Generated from protobuf message <code>google.protobuf.Duration</code>
+ */
+class Duration extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Signed seconds of the span of time. Must be from -315,576,000,000
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
+ *
+ * Generated from protobuf field <code>int64 seconds = 1;</code>
+ */
+ private $seconds = 0;
+ /**
+ * Signed fractions of a second at nanosecond resolution of the span
+ * of time. Durations less than one second are represented with a 0
+ * `seconds` field and a positive or negative `nanos` field. For durations
+ * of one second or more, a non-zero value for the `nanos` field must be
+ * of the same sign as the `seconds` field. Must be from -999,999,999
+ * to +999,999,999 inclusive.
+ *
+ * Generated from protobuf field <code>int32 nanos = 2;</code>
+ */
+ private $nanos = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $seconds
+ * Signed seconds of the span of time. Must be from -315,576,000,000
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
+ * @type int $nanos
+ * Signed fractions of a second at nanosecond resolution of the span
+ * of time. Durations less than one second are represented with a 0
+ * `seconds` field and a positive or negative `nanos` field. For durations
+ * of one second or more, a non-zero value for the `nanos` field must be
+ * of the same sign as the `seconds` field. Must be from -999,999,999
+ * to +999,999,999 inclusive.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Duration::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Signed seconds of the span of time. Must be from -315,576,000,000
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
+ *
+ * Generated from protobuf field <code>int64 seconds = 1;</code>
+ * @return int|string
+ */
+ public function getSeconds()
+ {
+ return $this->seconds;
+ }
+
+ /**
+ * Signed seconds of the span of time. Must be from -315,576,000,000
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
+ *
+ * Generated from protobuf field <code>int64 seconds = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setSeconds($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->seconds = $var;
+
+ return $this;
+ }
+
+ /**
+ * Signed fractions of a second at nanosecond resolution of the span
+ * of time. Durations less than one second are represented with a 0
+ * `seconds` field and a positive or negative `nanos` field. For durations
+ * of one second or more, a non-zero value for the `nanos` field must be
+ * of the same sign as the `seconds` field. Must be from -999,999,999
+ * to +999,999,999 inclusive.
+ *
+ * Generated from protobuf field <code>int32 nanos = 2;</code>
+ * @return int
+ */
+ public function getNanos()
+ {
+ return $this->nanos;
+ }
+
+ /**
+ * Signed fractions of a second at nanosecond resolution of the span
+ * of time. Durations less than one second are represented with a 0
+ * `seconds` field and a positive or negative `nanos` field. For durations
+ * of one second or more, a non-zero value for the `nanos` field must be
+ * of the same sign as the `seconds` field. Must be from -999,999,999
+ * to +999,999,999 inclusive.
+ *
+ * Generated from protobuf field <code>int32 nanos = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setNanos($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->nanos = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Enum.php b/vendor/google/protobuf/src/Google/Protobuf/Enum.php
new file mode 100644
index 0000000..243c40d
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Enum.php
@@ -0,0 +1,203 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Enum type definition.
+ *
+ * Generated from protobuf message <code>google.protobuf.Enum</code>
+ */
+class Enum extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Enum type name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ private $name = '';
+ /**
+ * Enum value definitions.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code>
+ */
+ private $enumvalue;
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ */
+ private $options;
+ /**
+ * The source context.
+ *
+ * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code>
+ */
+ private $source_context = null;
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code>
+ */
+ private $syntax = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Enum type name.
+ * @type \Google\Protobuf\EnumValue[]|\Google\Protobuf\Internal\RepeatedField $enumvalue
+ * Enum value definitions.
+ * @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options
+ * Protocol buffer options.
+ * @type \Google\Protobuf\SourceContext $source_context
+ * The source context.
+ * @type int $syntax
+ * The source syntax.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Type::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Enum type name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Enum type name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Enum value definitions.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEnumvalue()
+ {
+ return $this->enumvalue;
+ }
+
+ /**
+ * Enum value definitions.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code>
+ * @param \Google\Protobuf\EnumValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setEnumvalue($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\EnumValue::class);
+ $this->enumvalue = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
+ $this->options = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The source context.
+ *
+ * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code>
+ * @return \Google\Protobuf\SourceContext
+ */
+ public function getSourceContext()
+ {
+ return $this->source_context;
+ }
+
+ /**
+ * The source context.
+ *
+ * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code>
+ * @param \Google\Protobuf\SourceContext $var
+ * @return $this
+ */
+ public function setSourceContext($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class);
+ $this->source_context = $var;
+
+ return $this;
+ }
+
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code>
+ * @return int
+ */
+ public function getSyntax()
+ {
+ return $this->syntax;
+ }
+
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setSyntax($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
+ $this->syntax = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/EnumDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/EnumDescriptor.php
new file mode 100644
index 0000000..a8b56c0
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/EnumDescriptor.php
@@ -0,0 +1,79 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2017 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+namespace Google\Protobuf;
+
+class EnumDescriptor
+{
+ private $internal_desc;
+
+ /**
+ * @internal
+ */
+ public function __construct($internal_desc)
+ {
+ $this->internal_desc = $internal_desc;
+ }
+
+ /**
+ * @return string Full protobuf message name
+ */
+ public function getFullName()
+ {
+ return $this->internal_desc->getFullName();
+ }
+
+ /**
+ * @return string PHP class name
+ */
+ public function getClass()
+ {
+ return $this->internal_desc->getClass();
+ }
+
+ /**
+ * @param int $index Must be >= 0 and < getValueCount()
+ * @return EnumValueDescriptor
+ */
+ public function getValue($index)
+ {
+ return $this->internal_desc->getValueDescriptorByIndex($index);
+ }
+
+ /**
+ * @return int Number of values in enum
+ */
+ public function getValueCount()
+ {
+ return $this->internal_desc->getValueCount();
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php b/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php
new file mode 100644
index 0000000..1dc3c7a
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php
@@ -0,0 +1,135 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Enum value definition.
+ *
+ * Generated from protobuf message <code>google.protobuf.EnumValue</code>
+ */
+class EnumValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Enum value name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ private $name = '';
+ /**
+ * Enum value number.
+ *
+ * Generated from protobuf field <code>int32 number = 2;</code>
+ */
+ private $number = 0;
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ */
+ private $options;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Enum value name.
+ * @type int $number
+ * Enum value number.
+ * @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options
+ * Protocol buffer options.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Type::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Enum value name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Enum value name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Enum value number.
+ *
+ * Generated from protobuf field <code>int32 number = 2;</code>
+ * @return int
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ /**
+ * Enum value number.
+ *
+ * Generated from protobuf field <code>int32 number = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+
+ return $this;
+ }
+
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
+ $this->options = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/EnumValueDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/EnumValueDescriptor.php
new file mode 100644
index 0000000..e76e199
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/EnumValueDescriptor.php
@@ -0,0 +1,64 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+namespace Google\Protobuf;
+
+class EnumValueDescriptor
+{
+ private $name;
+ private $number;
+
+ /**
+ * @internal
+ */
+ public function __construct($name, $number)
+ {
+ $this->name = $name;
+ $this->number = $number;
+ }
+
+ /**
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * @return int
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Field.php b/vendor/google/protobuf/src/Google/Protobuf/Field.php
new file mode 100644
index 0000000..8da43e3
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Field.php
@@ -0,0 +1,381 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A single field of a message type.
+ *
+ * Generated from protobuf message <code>google.protobuf.Field</code>
+ */
+class Field extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The field type.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
+ */
+ private $kind = 0;
+ /**
+ * The field cardinality.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
+ */
+ private $cardinality = 0;
+ /**
+ * The field number.
+ *
+ * Generated from protobuf field <code>int32 number = 3;</code>
+ */
+ private $number = 0;
+ /**
+ * The field name.
+ *
+ * Generated from protobuf field <code>string name = 4;</code>
+ */
+ private $name = '';
+ /**
+ * The field type URL, without the scheme, for message or enumeration
+ * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ *
+ * Generated from protobuf field <code>string type_url = 6;</code>
+ */
+ private $type_url = '';
+ /**
+ * The index of the field type in `Type.oneofs`, for message or enumeration
+ * types. The first type has index 1; zero means the type is not in the list.
+ *
+ * Generated from protobuf field <code>int32 oneof_index = 7;</code>
+ */
+ private $oneof_index = 0;
+ /**
+ * Whether to use alternative packed wire representation.
+ *
+ * Generated from protobuf field <code>bool packed = 8;</code>
+ */
+ private $packed = false;
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
+ */
+ private $options;
+ /**
+ * The field JSON name.
+ *
+ * Generated from protobuf field <code>string json_name = 10;</code>
+ */
+ private $json_name = '';
+ /**
+ * The string value of the default value of this field. Proto2 syntax only.
+ *
+ * Generated from protobuf field <code>string default_value = 11;</code>
+ */
+ private $default_value = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $kind
+ * The field type.
+ * @type int $cardinality
+ * The field cardinality.
+ * @type int $number
+ * The field number.
+ * @type string $name
+ * The field name.
+ * @type string $type_url
+ * The field type URL, without the scheme, for message or enumeration
+ * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ * @type int $oneof_index
+ * The index of the field type in `Type.oneofs`, for message or enumeration
+ * types. The first type has index 1; zero means the type is not in the list.
+ * @type bool $packed
+ * Whether to use alternative packed wire representation.
+ * @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options
+ * The protocol buffer options.
+ * @type string $json_name
+ * The field JSON name.
+ * @type string $default_value
+ * The string value of the default value of this field. Proto2 syntax only.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Type::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The field type.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
+ * @return int
+ */
+ public function getKind()
+ {
+ return $this->kind;
+ }
+
+ /**
+ * The field type.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setKind($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Field_Kind::class);
+ $this->kind = $var;
+
+ return $this;
+ }
+
+ /**
+ * The field cardinality.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
+ * @return int
+ */
+ public function getCardinality()
+ {
+ return $this->cardinality;
+ }
+
+ /**
+ * The field cardinality.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setCardinality($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Field_Cardinality::class);
+ $this->cardinality = $var;
+
+ return $this;
+ }
+
+ /**
+ * The field number.
+ *
+ * Generated from protobuf field <code>int32 number = 3;</code>
+ * @return int
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ /**
+ * The field number.
+ *
+ * Generated from protobuf field <code>int32 number = 3;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+
+ return $this;
+ }
+
+ /**
+ * The field name.
+ *
+ * Generated from protobuf field <code>string name = 4;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The field name.
+ *
+ * Generated from protobuf field <code>string name = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The field type URL, without the scheme, for message or enumeration
+ * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ *
+ * Generated from protobuf field <code>string type_url = 6;</code>
+ * @return string
+ */
+ public function getTypeUrl()
+ {
+ return $this->type_url;
+ }
+
+ /**
+ * The field type URL, without the scheme, for message or enumeration
+ * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ *
+ * Generated from protobuf field <code>string type_url = 6;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTypeUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * The index of the field type in `Type.oneofs`, for message or enumeration
+ * types. The first type has index 1; zero means the type is not in the list.
+ *
+ * Generated from protobuf field <code>int32 oneof_index = 7;</code>
+ * @return int
+ */
+ public function getOneofIndex()
+ {
+ return $this->oneof_index;
+ }
+
+ /**
+ * The index of the field type in `Type.oneofs`, for message or enumeration
+ * types. The first type has index 1; zero means the type is not in the list.
+ *
+ * Generated from protobuf field <code>int32 oneof_index = 7;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setOneofIndex($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->oneof_index = $var;
+
+ return $this;
+ }
+
+ /**
+ * Whether to use alternative packed wire representation.
+ *
+ * Generated from protobuf field <code>bool packed = 8;</code>
+ * @return bool
+ */
+ public function getPacked()
+ {
+ return $this->packed;
+ }
+
+ /**
+ * Whether to use alternative packed wire representation.
+ *
+ * Generated from protobuf field <code>bool packed = 8;</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setPacked($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->packed = $var;
+
+ return $this;
+ }
+
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
+ * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
+ $this->options = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The field JSON name.
+ *
+ * Generated from protobuf field <code>string json_name = 10;</code>
+ * @return string
+ */
+ public function getJsonName()
+ {
+ return $this->json_name;
+ }
+
+ /**
+ * The field JSON name.
+ *
+ * Generated from protobuf field <code>string json_name = 10;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setJsonName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->json_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The string value of the default value of this field. Proto2 syntax only.
+ *
+ * Generated from protobuf field <code>string default_value = 11;</code>
+ * @return string
+ */
+ public function getDefaultValue()
+ {
+ return $this->default_value;
+ }
+
+ /**
+ * The string value of the default value of this field. Proto2 syntax only.
+ *
+ * Generated from protobuf field <code>string default_value = 11;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setDefaultValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->default_value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Field/Cardinality.php b/vendor/google/protobuf/src/Google/Protobuf/Field/Cardinality.php
new file mode 100644
index 0000000..479dc0b
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Field/Cardinality.php
@@ -0,0 +1,70 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf\Field;
+
+use UnexpectedValueException;
+
+/**
+ * Whether a field is optional, required, or repeated.
+ *
+ * Protobuf type <code>google.protobuf.Field.Cardinality</code>
+ */
+class Cardinality
+{
+ /**
+ * For fields with unknown cardinality.
+ *
+ * Generated from protobuf enum <code>CARDINALITY_UNKNOWN = 0;</code>
+ */
+ const CARDINALITY_UNKNOWN = 0;
+ /**
+ * For optional fields.
+ *
+ * Generated from protobuf enum <code>CARDINALITY_OPTIONAL = 1;</code>
+ */
+ const CARDINALITY_OPTIONAL = 1;
+ /**
+ * For required fields. Proto2 syntax only.
+ *
+ * Generated from protobuf enum <code>CARDINALITY_REQUIRED = 2;</code>
+ */
+ const CARDINALITY_REQUIRED = 2;
+ /**
+ * For repeated fields.
+ *
+ * Generated from protobuf enum <code>CARDINALITY_REPEATED = 3;</code>
+ */
+ const CARDINALITY_REPEATED = 3;
+
+ private static $valueToName = [
+ self::CARDINALITY_UNKNOWN => 'CARDINALITY_UNKNOWN',
+ self::CARDINALITY_OPTIONAL => 'CARDINALITY_OPTIONAL',
+ self::CARDINALITY_REQUIRED => 'CARDINALITY_REQUIRED',
+ self::CARDINALITY_REPEATED => 'CARDINALITY_REPEATED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Cardinality::class, \Google\Protobuf\Field_Cardinality::class);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Field/Kind.php b/vendor/google/protobuf/src/Google/Protobuf/Field/Kind.php
new file mode 100644
index 0000000..f30bd2f
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Field/Kind.php
@@ -0,0 +1,175 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf\Field;
+
+use UnexpectedValueException;
+
+/**
+ * Basic field types.
+ *
+ * Protobuf type <code>google.protobuf.Field.Kind</code>
+ */
+class Kind
+{
+ /**
+ * Field type unknown.
+ *
+ * Generated from protobuf enum <code>TYPE_UNKNOWN = 0;</code>
+ */
+ const TYPE_UNKNOWN = 0;
+ /**
+ * Field type double.
+ *
+ * Generated from protobuf enum <code>TYPE_DOUBLE = 1;</code>
+ */
+ const TYPE_DOUBLE = 1;
+ /**
+ * Field type float.
+ *
+ * Generated from protobuf enum <code>TYPE_FLOAT = 2;</code>
+ */
+ const TYPE_FLOAT = 2;
+ /**
+ * Field type int64.
+ *
+ * Generated from protobuf enum <code>TYPE_INT64 = 3;</code>
+ */
+ const TYPE_INT64 = 3;
+ /**
+ * Field type uint64.
+ *
+ * Generated from protobuf enum <code>TYPE_UINT64 = 4;</code>
+ */
+ const TYPE_UINT64 = 4;
+ /**
+ * Field type int32.
+ *
+ * Generated from protobuf enum <code>TYPE_INT32 = 5;</code>
+ */
+ const TYPE_INT32 = 5;
+ /**
+ * Field type fixed64.
+ *
+ * Generated from protobuf enum <code>TYPE_FIXED64 = 6;</code>
+ */
+ const TYPE_FIXED64 = 6;
+ /**
+ * Field type fixed32.
+ *
+ * Generated from protobuf enum <code>TYPE_FIXED32 = 7;</code>
+ */
+ const TYPE_FIXED32 = 7;
+ /**
+ * Field type bool.
+ *
+ * Generated from protobuf enum <code>TYPE_BOOL = 8;</code>
+ */
+ const TYPE_BOOL = 8;
+ /**
+ * Field type string.
+ *
+ * Generated from protobuf enum <code>TYPE_STRING = 9;</code>
+ */
+ const TYPE_STRING = 9;
+ /**
+ * Field type group. Proto2 syntax only, and deprecated.
+ *
+ * Generated from protobuf enum <code>TYPE_GROUP = 10;</code>
+ */
+ const TYPE_GROUP = 10;
+ /**
+ * Field type message.
+ *
+ * Generated from protobuf enum <code>TYPE_MESSAGE = 11;</code>
+ */
+ const TYPE_MESSAGE = 11;
+ /**
+ * Field type bytes.
+ *
+ * Generated from protobuf enum <code>TYPE_BYTES = 12;</code>
+ */
+ const TYPE_BYTES = 12;
+ /**
+ * Field type uint32.
+ *
+ * Generated from protobuf enum <code>TYPE_UINT32 = 13;</code>
+ */
+ const TYPE_UINT32 = 13;
+ /**
+ * Field type enum.
+ *
+ * Generated from protobuf enum <code>TYPE_ENUM = 14;</code>
+ */
+ const TYPE_ENUM = 14;
+ /**
+ * Field type sfixed32.
+ *
+ * Generated from protobuf enum <code>TYPE_SFIXED32 = 15;</code>
+ */
+ const TYPE_SFIXED32 = 15;
+ /**
+ * Field type sfixed64.
+ *
+ * Generated from protobuf enum <code>TYPE_SFIXED64 = 16;</code>
+ */
+ const TYPE_SFIXED64 = 16;
+ /**
+ * Field type sint32.
+ *
+ * Generated from protobuf enum <code>TYPE_SINT32 = 17;</code>
+ */
+ const TYPE_SINT32 = 17;
+ /**
+ * Field type sint64.
+ *
+ * Generated from protobuf enum <code>TYPE_SINT64 = 18;</code>
+ */
+ const TYPE_SINT64 = 18;
+
+ private static $valueToName = [
+ self::TYPE_UNKNOWN => 'TYPE_UNKNOWN',
+ self::TYPE_DOUBLE => 'TYPE_DOUBLE',
+ self::TYPE_FLOAT => 'TYPE_FLOAT',
+ self::TYPE_INT64 => 'TYPE_INT64',
+ self::TYPE_UINT64 => 'TYPE_UINT64',
+ self::TYPE_INT32 => 'TYPE_INT32',
+ self::TYPE_FIXED64 => 'TYPE_FIXED64',
+ self::TYPE_FIXED32 => 'TYPE_FIXED32',
+ self::TYPE_BOOL => 'TYPE_BOOL',
+ self::TYPE_STRING => 'TYPE_STRING',
+ self::TYPE_GROUP => 'TYPE_GROUP',
+ self::TYPE_MESSAGE => 'TYPE_MESSAGE',
+ self::TYPE_BYTES => 'TYPE_BYTES',
+ self::TYPE_UINT32 => 'TYPE_UINT32',
+ self::TYPE_ENUM => 'TYPE_ENUM',
+ self::TYPE_SFIXED32 => 'TYPE_SFIXED32',
+ self::TYPE_SFIXED64 => 'TYPE_SFIXED64',
+ self::TYPE_SINT32 => 'TYPE_SINT32',
+ self::TYPE_SINT64 => 'TYPE_SINT64',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Kind::class, \Google\Protobuf\Field_Kind::class);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/FieldDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/FieldDescriptor.php
new file mode 100644
index 0000000..ac9271f
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/FieldDescriptor.php
@@ -0,0 +1,117 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2017 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GetPublicDescriptorTrait;
+use Google\Protobuf\Internal\GPBType;
+
+class FieldDescriptor
+{
+ use GetPublicDescriptorTrait;
+
+ private $internal_desc;
+
+ /**
+ * @internal
+ */
+ public function __construct($internal_desc)
+ {
+ $this->internal_desc = $internal_desc;
+ }
+
+ /**
+ * @return string Field name
+ */
+ public function getName()
+ {
+ return $this->internal_desc->getName();
+ }
+
+ /**
+ * @return int Protobuf field number
+ */
+ public function getNumber()
+ {
+ return $this->internal_desc->getNumber();
+ }
+
+ /**
+ * @return int
+ */
+ public function getLabel()
+ {
+ return $this->internal_desc->getLabel();
+ }
+
+ /**
+ * @return int
+ */
+ public function getType()
+ {
+ return $this->internal_desc->getType();
+ }
+
+ /**
+ * @return Descriptor Returns a descriptor for the field type if the field type is a message, otherwise throws \Exception
+ * @throws \Exception
+ */
+ public function getMessageType()
+ {
+ if ($this->getType() == GPBType::MESSAGE) {
+ return $this->getPublicDescriptor($this->internal_desc->getMessageType());
+ } else {
+ throw new \Exception("Cannot get message type for non-message field '" . $this->getName() . "'");
+ }
+ }
+
+ /**
+ * @return EnumDescriptor Returns an enum descriptor if the field type is an enum, otherwise throws \Exception
+ * @throws \Exception
+ */
+ public function getEnumType()
+ {
+ if ($this->getType() == GPBType::ENUM) {
+ return $this->getPublicDescriptor($this->internal_desc->getEnumType());
+ } else {
+ throw new \Exception("Cannot get enum type for non-enum field '" . $this->getName() . "'");
+ }
+ }
+
+ /**
+ * @return boolean
+ */
+ public function isMap()
+ {
+ return $this->internal_desc->isMap();
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/FieldMask.php b/vendor/google/protobuf/src/Google/Protobuf/FieldMask.php
new file mode 100644
index 0000000..8fb38cb
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/FieldMask.php
@@ -0,0 +1,223 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/field_mask.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * `FieldMask` represents a set of symbolic field paths, for example:
+ * paths: "f.a"
+ * paths: "f.b.d"
+ * Here `f` represents a field in some root message, `a` and `b`
+ * fields in the message found in `f`, and `d` a field found in the
+ * message in `f.b`.
+ * Field masks are used to specify a subset of fields that should be
+ * returned by a get operation or modified by an update operation.
+ * Field masks also have a custom JSON encoding (see below).
+ * # Field Masks in Projections
+ * When used in the context of a projection, a response message or
+ * sub-message is filtered by the API to only contain those fields as
+ * specified in the mask. For example, if the mask in the previous
+ * example is applied to a response message as follows:
+ * f {
+ * a : 22
+ * b {
+ * d : 1
+ * x : 2
+ * }
+ * y : 13
+ * }
+ * z: 8
+ * The result will not contain specific values for fields x,y and z
+ * (their value will be set to the default, and omitted in proto text
+ * output):
+ * f {
+ * a : 22
+ * b {
+ * d : 1
+ * }
+ * }
+ * A repeated field is not allowed except at the last position of a
+ * paths string.
+ * If a FieldMask object is not present in a get operation, the
+ * operation applies to all fields (as if a FieldMask of all fields
+ * had been specified).
+ * Note that a field mask does not necessarily apply to the
+ * top-level response message. In case of a REST get operation, the
+ * field mask applies directly to the response, but in case of a REST
+ * list operation, the mask instead applies to each individual message
+ * in the returned resource list. In case of a REST custom method,
+ * other definitions may be used. Where the mask applies will be
+ * clearly documented together with its declaration in the API. In
+ * any case, the effect on the returned resource/resources is required
+ * behavior for APIs.
+ * # Field Masks in Update Operations
+ * A field mask in update operations specifies which fields of the
+ * targeted resource are going to be updated. The API is required
+ * to only change the values of the fields as specified in the mask
+ * and leave the others untouched. If a resource is passed in to
+ * describe the updated values, the API ignores the values of all
+ * fields not covered by the mask.
+ * If a repeated field is specified for an update operation, the existing
+ * repeated values in the target resource will be overwritten by the new values.
+ * Note that a repeated field is only allowed in the last position of a `paths`
+ * string.
+ * If a sub-message is specified in the last position of the field mask for an
+ * update operation, then the existing sub-message in the target resource is
+ * overwritten. Given the target message:
+ * f {
+ * b {
+ * d : 1
+ * x : 2
+ * }
+ * c : 1
+ * }
+ * And an update message:
+ * f {
+ * b {
+ * d : 10
+ * }
+ * }
+ * then if the field mask is:
+ * paths: "f.b"
+ * then the result will be:
+ * f {
+ * b {
+ * d : 10
+ * }
+ * c : 1
+ * }
+ * However, if the update mask was:
+ * paths: "f.b.d"
+ * then the result would be:
+ * f {
+ * b {
+ * d : 10
+ * x : 2
+ * }
+ * c : 1
+ * }
+ * In order to reset a field's value to the default, the field must
+ * be in the mask and set to the default value in the provided resource.
+ * Hence, in order to reset all fields of a resource, provide a default
+ * instance of the resource and set all fields in the mask, or do
+ * not provide a mask as described below.
+ * If a field mask is not present on update, the operation applies to
+ * all fields (as if a field mask of all fields has been specified).
+ * Note that in the presence of schema evolution, this may mean that
+ * fields the client does not know and has therefore not filled into
+ * the request will be reset to their default. If this is unwanted
+ * behavior, a specific service may require a client to always specify
+ * a field mask, producing an error if not.
+ * As with get operations, the location of the resource which
+ * describes the updated values in the request message depends on the
+ * operation kind. In any case, the effect of the field mask is
+ * required to be honored by the API.
+ * ## Considerations for HTTP REST
+ * The HTTP kind of an update operation which uses a field mask must
+ * be set to PATCH instead of PUT in order to satisfy HTTP semantics
+ * (PUT must only be used for full updates).
+ * # JSON Encoding of Field Masks
+ * In JSON, a field mask is encoded as a single string where paths are
+ * separated by a comma. Fields name in each path are converted
+ * to/from lower-camel naming conventions.
+ * As an example, consider the following message declarations:
+ * message Profile {
+ * User user = 1;
+ * Photo photo = 2;
+ * }
+ * message User {
+ * string display_name = 1;
+ * string address = 2;
+ * }
+ * In proto a field mask for `Profile` may look as such:
+ * mask {
+ * paths: "user.display_name"
+ * paths: "photo"
+ * }
+ * In JSON, the same mask is represented as below:
+ * {
+ * mask: "user.displayName,photo"
+ * }
+ * # Field Masks and Oneof Fields
+ * Field masks treat fields in oneofs just as regular fields. Consider the
+ * following message:
+ * message SampleMessage {
+ * oneof test_oneof {
+ * string name = 4;
+ * SubMessage sub_message = 9;
+ * }
+ * }
+ * The field mask can be:
+ * mask {
+ * paths: "name"
+ * }
+ * Or:
+ * mask {
+ * paths: "sub_message"
+ * }
+ * Note that oneof type names ("test_oneof" in this case) cannot be used in
+ * paths.
+ * ## Field Mask Verification
+ * The implementation of any API method which has a FieldMask type field in the
+ * request should verify the included field paths, and return an
+ * `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
+ *
+ * Generated from protobuf message <code>google.protobuf.FieldMask</code>
+ */
+class FieldMask extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of field mask paths.
+ *
+ * Generated from protobuf field <code>repeated string paths = 1;</code>
+ */
+ private $paths;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string[]|\Google\Protobuf\Internal\RepeatedField $paths
+ * The set of field mask paths.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\FieldMask::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of field mask paths.
+ *
+ * Generated from protobuf field <code>repeated string paths = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getPaths()
+ {
+ return $this->paths;
+ }
+
+ /**
+ * The set of field mask paths.
+ *
+ * Generated from protobuf field <code>repeated string paths = 1;</code>
+ * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setPaths($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->paths = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Field_Cardinality.php b/vendor/google/protobuf/src/Google/Protobuf/Field_Cardinality.php
new file mode 100644
index 0000000..dff8f89
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Field_Cardinality.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Field\Cardinality instead.
+ * @deprecated
+ */
+ class Field_Cardinality {}
+}
+class_exists(Field\Cardinality::class);
+@trigger_error('Google\Protobuf\Field_Cardinality is deprecated and will be removed in the next major release. Use Google\Protobuf\Field\Cardinality instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Field_Kind.php b/vendor/google/protobuf/src/Google/Protobuf/Field_Kind.php
new file mode 100644
index 0000000..aa20237
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Field_Kind.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Field\Kind instead.
+ * @deprecated
+ */
+ class Field_Kind {}
+}
+class_exists(Field\Kind::class);
+@trigger_error('Google\Protobuf\Field_Kind is deprecated and will be removed in the next major release. Use Google\Protobuf\Field\Kind instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/FloatValue.php b/vendor/google/protobuf/src/Google/Protobuf/FloatValue.php
new file mode 100644
index 0000000..47ba52e
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/FloatValue.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `float`.
+ * The JSON representation for `FloatValue` is JSON number.
+ *
+ * Generated from protobuf message <code>google.protobuf.FloatValue</code>
+ */
+class FloatValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The float value.
+ *
+ * Generated from protobuf field <code>float value = 1;</code>
+ */
+ private $value = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $value
+ * The float value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The float value.
+ *
+ * Generated from protobuf field <code>float value = 1;</code>
+ * @return float
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The float value.
+ *
+ * Generated from protobuf field <code>float value = 1;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/GPBEmpty.php b/vendor/google/protobuf/src/Google/Protobuf/GPBEmpty.php
new file mode 100644
index 0000000..2de9c3b
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/GPBEmpty.php
@@ -0,0 +1,39 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/empty.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A generic empty message that you can re-use to avoid defining duplicated
+ * empty messages in your APIs. A typical example is to use it as the request
+ * or the response type of an API method. For instance:
+ * service Foo {
+ * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
+ * }
+ * The JSON representation for `Empty` is empty JSON object `{}`.
+ *
+ * Generated from protobuf message <code>google.protobuf.Empty</code>
+ */
+class GPBEmpty extends \Google\Protobuf\Internal\Message
+{
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce();
+ parent::__construct($data);
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Int32Value.php b/vendor/google/protobuf/src/Google/Protobuf/Int32Value.php
new file mode 100644
index 0000000..d7fd528
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Int32Value.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `int32`.
+ * The JSON representation for `Int32Value` is JSON number.
+ *
+ * Generated from protobuf message <code>google.protobuf.Int32Value</code>
+ */
+class Int32Value extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The int32 value.
+ *
+ * Generated from protobuf field <code>int32 value = 1;</code>
+ */
+ private $value = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $value
+ * The int32 value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The int32 value.
+ *
+ * Generated from protobuf field <code>int32 value = 1;</code>
+ * @return int
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The int32 value.
+ *
+ * Generated from protobuf field <code>int32 value = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Int64Value.php b/vendor/google/protobuf/src/Google/Protobuf/Int64Value.php
new file mode 100644
index 0000000..ca66305
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Int64Value.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `int64`.
+ * The JSON representation for `Int64Value` is JSON string.
+ *
+ * Generated from protobuf message <code>google.protobuf.Int64Value</code>
+ */
+class Int64Value extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The int64 value.
+ *
+ * Generated from protobuf field <code>int64 value = 1;</code>
+ */
+ private $value = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $value
+ * The int64 value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The int64 value.
+ *
+ * Generated from protobuf field <code>int64 value = 1;</code>
+ * @return int|string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The int64 value.
+ *
+ * Generated from protobuf field <code>int64 value = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php
new file mode 100644
index 0000000..33b1f5a
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php
@@ -0,0 +1,382 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\Uint64;
+
+class CodedInputStream
+{
+
+ private $buffer;
+ private $buffer_size_after_limit;
+ private $buffer_end;
+ private $current;
+ private $current_limit;
+ private $legitimate_message_end;
+ private $recursion_budget;
+ private $recursion_limit;
+ private $total_bytes_limit;
+ private $total_bytes_read;
+
+ const MAX_VARINT_BYTES = 10;
+ const DEFAULT_RECURSION_LIMIT = 100;
+ const DEFAULT_TOTAL_BYTES_LIMIT = 33554432; // 32 << 20, 32MB
+
+ public function __construct($buffer)
+ {
+ $start = 0;
+ $end = strlen($buffer);
+ $this->buffer = $buffer;
+ $this->buffer_size_after_limit = 0;
+ $this->buffer_end = $end;
+ $this->current = $start;
+ $this->current_limit = $end;
+ $this->legitimate_message_end = false;
+ $this->recursion_budget = self::DEFAULT_RECURSION_LIMIT;
+ $this->recursion_limit = self::DEFAULT_RECURSION_LIMIT;
+ $this->total_bytes_limit = self::DEFAULT_TOTAL_BYTES_LIMIT;
+ $this->total_bytes_read = $end - $start;
+ }
+
+ private function advance($amount)
+ {
+ $this->current += $amount;
+ }
+
+ public function bufferSize()
+ {
+ return $this->buffer_end - $this->current;
+ }
+
+ public function current()
+ {
+ return $this->total_bytes_read -
+ ($this->buffer_end - $this->current +
+ $this->buffer_size_after_limit);
+ }
+
+ public function substr($start, $end)
+ {
+ return substr($this->buffer, $start, $end - $start);
+ }
+
+ private function recomputeBufferLimits()
+ {
+ $this->buffer_end += $this->buffer_size_after_limit;
+ $closest_limit = min($this->current_limit, $this->total_bytes_limit);
+ if ($closest_limit < $this->total_bytes_read) {
+ // The limit position is in the current buffer. We must adjust the
+ // buffer size accordingly.
+ $this->buffer_size_after_limit = $this->total_bytes_read -
+ $closest_limit;
+ $this->buffer_end -= $this->buffer_size_after_limit;
+ } else {
+ $this->buffer_size_after_limit = 0;
+ }
+ }
+
+ private function consumedEntireMessage()
+ {
+ return $this->legitimate_message_end;
+ }
+
+ /**
+ * Read uint32 into $var. Advance buffer with consumed bytes. If the
+ * contained varint is larger than 32 bits, discard the high order bits.
+ * @param $var.
+ */
+ public function readVarint32(&$var)
+ {
+ if (!$this->readVarint64($var)) {
+ return false;
+ }
+
+ if (PHP_INT_SIZE == 4) {
+ $var = bcmod($var, 4294967296);
+ } else {
+ $var &= 0xFFFFFFFF;
+ }
+
+ // Convert large uint32 to int32.
+ if ($var > 0x7FFFFFFF) {
+ if (PHP_INT_SIZE === 8) {
+ $var = $var | (0xFFFFFFFF << 32);
+ } else {
+ $var = bcsub($var, 4294967296);
+ }
+ }
+
+ $var = intval($var);
+ return true;
+ }
+
+ /**
+ * Read Uint64 into $var. Advance buffer with consumed bytes.
+ * @param $var.
+ */
+ public function readVarint64(&$var)
+ {
+ $count = 0;
+
+ if (PHP_INT_SIZE == 4) {
+ $high = 0;
+ $low = 0;
+ $b = 0;
+
+ do {
+ if ($this->current === $this->buffer_end) {
+ return false;
+ }
+ if ($count === self::MAX_VARINT_BYTES) {
+ return false;
+ }
+ $b = ord($this->buffer[$this->current]);
+ $bits = 7 * $count;
+ if ($bits >= 32) {
+ $high |= (($b & 0x7F) << ($bits - 32));
+ } else if ($bits > 25){
+ // $bits is 28 in this case.
+ $low |= (($b & 0x7F) << 28);
+ $high = ($b & 0x7F) >> 4;
+ } else {
+ $low |= (($b & 0x7F) << $bits);
+ }
+
+ $this->advance(1);
+ $count += 1;
+ } while ($b & 0x80);
+
+ $var = GPBUtil::combineInt32ToInt64($high, $low);
+ if (bccomp($var, 0) < 0) {
+ $var = bcadd($var, "18446744073709551616");
+ }
+ } else {
+ $result = 0;
+ $shift = 0;
+
+ do {
+ if ($this->current === $this->buffer_end) {
+ return false;
+ }
+ if ($count === self::MAX_VARINT_BYTES) {
+ return false;
+ }
+
+ $byte = ord($this->buffer[$this->current]);
+ $result |= ($byte & 0x7f) << $shift;
+ $shift += 7;
+ $this->advance(1);
+ $count += 1;
+ } while ($byte > 0x7f);
+
+ $var = $result;
+ }
+
+ return true;
+ }
+
+ /**
+ * Read int into $var. If the result is larger than the largest integer, $var
+ * will be -1. Advance buffer with consumed bytes.
+ * @param $var.
+ */
+ public function readVarintSizeAsInt(&$var)
+ {
+ if (!$this->readVarint64($var)) {
+ return false;
+ }
+ $var = (int)$var;
+ return true;
+ }
+
+ /**
+ * Read 32-bit unsiged integer to $var. If the buffer has less than 4 bytes,
+ * return false. Advance buffer with consumed bytes.
+ * @param $var.
+ */
+ public function readLittleEndian32(&$var)
+ {
+ $data = null;
+ if (!$this->readRaw(4, $data)) {
+ return false;
+ }
+ $var = unpack('V', $data);
+ $var = $var[1];
+ return true;
+ }
+
+ /**
+ * Read 64-bit unsiged integer to $var. If the buffer has less than 8 bytes,
+ * return false. Advance buffer with consumed bytes.
+ * @param $var.
+ */
+ public function readLittleEndian64(&$var)
+ {
+ $data = null;
+ if (!$this->readRaw(4, $data)) {
+ return false;
+ }
+ $low = unpack('V', $data)[1];
+ if (!$this->readRaw(4, $data)) {
+ return false;
+ }
+ $high = unpack('V', $data)[1];
+ if (PHP_INT_SIZE == 4) {
+ $var = GPBUtil::combineInt32ToInt64($high, $low);
+ } else {
+ $var = ($high << 32) | $low;
+ }
+ return true;
+ }
+
+ /**
+ * Read tag into $var. Advance buffer with consumed bytes.
+ * @param $var.
+ */
+ public function readTag()
+ {
+ if ($this->current === $this->buffer_end) {
+ // Make sure that it failed due to EOF, not because we hit
+ // total_bytes_limit, which, unlike normal limits, is not a valid
+ // place to end a message.
+ $current_position = $this->total_bytes_read -
+ $this->buffer_size_after_limit;
+ if ($current_position >= $this->total_bytes_limit) {
+ // Hit total_bytes_limit_. But if we also hit the normal limit,
+ // we're still OK.
+ $this->legitimate_message_end =
+ ($this->current_limit === $this->total_bytes_limit);
+ } else {
+ $this->legitimate_message_end = true;
+ }
+ return 0;
+ }
+
+ $result = 0;
+ // The larget tag is 2^29 - 1, which can be represented by int32.
+ $success = $this->readVarint32($result);
+ if ($success) {
+ return $result;
+ } else {
+ return 0;
+ }
+ }
+
+ public function readRaw($size, &$buffer)
+ {
+ $current_buffer_size = 0;
+ if ($this->bufferSize() < $size) {
+ return false;
+ }
+
+ if ($size === 0) {
+ $buffer = "";
+ } else {
+ $buffer = substr($this->buffer, $this->current, $size);
+ $this->advance($size);
+ }
+
+ return true;
+ }
+
+ /* Places a limit on the number of bytes that the stream may read, starting
+ * from the current position. Once the stream hits this limit, it will act
+ * like the end of the input has been reached until popLimit() is called.
+ *
+ * As the names imply, the stream conceptually has a stack of limits. The
+ * shortest limit on the stack is always enforced, even if it is not the top
+ * limit.
+ *
+ * The value returned by pushLimit() is opaque to the caller, and must be
+ * passed unchanged to the corresponding call to popLimit().
+ *
+ * @param integer $byte_limit
+ * @throws \Exception Fail to push limit.
+ */
+ public function pushLimit($byte_limit)
+ {
+ // Current position relative to the beginning of the stream.
+ $current_position = $this->current();
+ $old_limit = $this->current_limit;
+
+ // security: byte_limit is possibly evil, so check for negative values
+ // and overflow.
+ if ($byte_limit >= 0 &&
+ $byte_limit <= PHP_INT_MAX - $current_position &&
+ $byte_limit <= $this->current_limit - $current_position) {
+ $this->current_limit = $current_position + $byte_limit;
+ $this->recomputeBufferLimits();
+ } else {
+ throw new GPBDecodeException("Fail to push limit.");
+ }
+
+ return $old_limit;
+ }
+
+ /* The limit passed in is actually the *old* limit, which we returned from
+ * PushLimit().
+ *
+ * @param integer $byte_limit
+ */
+ public function popLimit($byte_limit)
+ {
+ $this->current_limit = $byte_limit;
+ $this->recomputeBufferLimits();
+ // We may no longer be at a legitimate message end. ReadTag() needs to
+ // be called again to find out.
+ $this->legitimate_message_end = false;
+ }
+
+ public function incrementRecursionDepthAndPushLimit(
+ $byte_limit, &$old_limit, &$recursion_budget)
+ {
+ $old_limit = $this->pushLimit($byte_limit);
+ $recursion_limit = --$this->recursion_limit;
+ }
+
+ public function decrementRecursionDepthAndPopLimit($byte_limit)
+ {
+ $result = $this->consumedEntireMessage();
+ $this->popLimit($byte_limit);
+ ++$this->recursion_budget;
+ return $result;
+ }
+
+ public function bytesUntilLimit()
+ {
+ if ($this->current_limit === PHP_INT_MAX) {
+ return -1;
+ }
+ return $this->current_limit - $this->current;
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedOutputStream.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedOutputStream.php
new file mode 100644
index 0000000..f75e9c6
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedOutputStream.php
@@ -0,0 +1,159 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+namespace Google\Protobuf\Internal;
+
+class CodedOutputStream
+{
+
+ private $buffer;
+ private $buffer_size;
+ private $current;
+
+ const MAX_VARINT64_BYTES = 10;
+
+ public function __construct($size)
+ {
+ $this->current = 0;
+ $this->buffer_size = $size;
+ $this->buffer = str_repeat(chr(0), $this->buffer_size);
+ }
+
+ public function getData()
+ {
+ return $this->buffer;
+ }
+
+ public function writeVarint32($value, $trim)
+ {
+ $bytes = str_repeat(chr(0), self::MAX_VARINT64_BYTES);
+ $size = self::writeVarintToArray($value, $bytes, $trim);
+ return $this->writeRaw($bytes, $size);
+ }
+
+ public function writeVarint64($value)
+ {
+ $bytes = str_repeat(chr(0), self::MAX_VARINT64_BYTES);
+ $size = self::writeVarintToArray($value, $bytes);
+ return $this->writeRaw($bytes, $size);
+ }
+
+ public function writeLittleEndian32($value)
+ {
+ $bytes = str_repeat(chr(0), 4);
+ $size = self::writeLittleEndian32ToArray($value, $bytes);
+ return $this->writeRaw($bytes, $size);
+ }
+
+ public function writeLittleEndian64($value)
+ {
+ $bytes = str_repeat(chr(0), 8);
+ $size = self::writeLittleEndian64ToArray($value, $bytes);
+ return $this->writeRaw($bytes, $size);
+ }
+
+ public function writeTag($tag)
+ {
+ return $this->writeVarint32($tag, true);
+ }
+
+ public function writeRaw($data, $size)
+ {
+ if ($this->buffer_size < $size) {
+ trigger_error("Output stream doesn't have enough buffer.");
+ return false;
+ }
+
+ for ($i = 0; $i < $size; $i++) {
+ $this->buffer[$this->current] = $data[$i];
+ $this->current++;
+ $this->buffer_size--;
+ }
+ return true;
+ }
+
+ public static function writeVarintToArray($value, &$buffer, $trim = false)
+ {
+ $current = 0;
+
+ $high = 0;
+ $low = 0;
+ if (PHP_INT_SIZE == 4) {
+ GPBUtil::divideInt64ToInt32($value, $high, $low, $trim);
+ } else {
+ $low = $value;
+ }
+
+ while (($low >= 0x80 || $low < 0) || $high != 0) {
+ $buffer[$current] = chr($low | 0x80);
+ $value = ($value >> 7) & ~(0x7F << ((PHP_INT_SIZE << 3) - 7));
+ $carry = ($high & 0x7F) << ((PHP_INT_SIZE << 3) - 7);
+ $high = ($high >> 7) & ~(0x7F << ((PHP_INT_SIZE << 3) - 7));
+ $low = (($low >> 7) & ~(0x7F << ((PHP_INT_SIZE << 3) - 7)) | $carry);
+ $current++;
+ }
+ $buffer[$current] = chr($low);
+ return $current + 1;
+ }
+
+ private static function writeLittleEndian32ToArray($value, &$buffer)
+ {
+ $buffer[0] = chr($value & 0x000000FF);
+ $buffer[1] = chr(($value >> 8) & 0x000000FF);
+ $buffer[2] = chr(($value >> 16) & 0x000000FF);
+ $buffer[3] = chr(($value >> 24) & 0x000000FF);
+ return 4;
+ }
+
+ private static function writeLittleEndian64ToArray($value, &$buffer)
+ {
+ $high = 0;
+ $low = 0;
+ if (PHP_INT_SIZE == 4) {
+ GPBUtil::divideInt64ToInt32($value, $high, $low);
+ } else {
+ $low = $value & 0xFFFFFFFF;
+ $high = ($value >> 32) & 0xFFFFFFFF;
+ }
+
+ $buffer[0] = chr($low & 0x000000FF);
+ $buffer[1] = chr(($low >> 8) & 0x000000FF);
+ $buffer[2] = chr(($low >> 16) & 0x000000FF);
+ $buffer[3] = chr(($low >> 24) & 0x000000FF);
+ $buffer[4] = chr($high & 0x000000FF);
+ $buffer[5] = chr(($high >> 8) & 0x000000FF);
+ $buffer[6] = chr(($high >> 16) & 0x000000FF);
+ $buffer[7] = chr(($high >> 24) & 0x000000FF);
+ return 8;
+ }
+
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php
new file mode 100644
index 0000000..21ac5de
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php
@@ -0,0 +1,222 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+namespace Google\Protobuf\Internal;
+
+class Descriptor
+{
+ use HasPublicDescriptorTrait;
+
+ private $full_name;
+ private $field = [];
+ private $json_to_field = [];
+ private $name_to_field = [];
+ private $index_to_field = [];
+ private $nested_type = [];
+ private $enum_type = [];
+ private $klass;
+ private $legacy_klass;
+ private $options;
+ private $oneof_decl = [];
+
+ public function __construct()
+ {
+ $this->public_desc = new \Google\Protobuf\Descriptor($this);
+ }
+
+ public function addOneofDecl($oneof)
+ {
+ $this->oneof_decl[] = $oneof;
+ }
+
+ public function getOneofDecl()
+ {
+ return $this->oneof_decl;
+ }
+
+ public function setFullName($full_name)
+ {
+ $this->full_name = $full_name;
+ }
+
+ public function getFullName()
+ {
+ return $this->full_name;
+ }
+
+ public function addField($field)
+ {
+ $this->field[$field->getNumber()] = $field;
+ $this->json_to_field[$field->getJsonName()] = $field;
+ $this->name_to_field[$field->getName()] = $field;
+ $this->index_to_field[] = $field;
+ }
+
+ public function getField()
+ {
+ return $this->field;
+ }
+
+ public function addNestedType($desc)
+ {
+ $this->nested_type[] = $desc;
+ }
+
+ public function getNestedType()
+ {
+ return $this->nested_type;
+ }
+
+ public function addEnumType($desc)
+ {
+ $this->enum_type[] = $desc;
+ }
+
+ public function getEnumType()
+ {
+ return $this->enum_type;
+ }
+
+ public function getFieldByNumber($number)
+ {
+ if (!isset($this->field[$number])) {
+ return NULL;
+ } else {
+ return $this->field[$number];
+ }
+ }
+
+ public function getFieldByJsonName($json_name)
+ {
+ if (!isset($this->json_to_field[$json_name])) {
+ return NULL;
+ } else {
+ return $this->json_to_field[$json_name];
+ }
+ }
+
+ public function getFieldByName($name)
+ {
+ if (!isset($this->name_to_field[$name])) {
+ return NULL;
+ } else {
+ return $this->name_to_field[$name];
+ }
+ }
+
+ public function getFieldByIndex($index)
+ {
+ if (count($this->index_to_field) <= $index) {
+ return NULL;
+ } else {
+ return $this->index_to_field[$index];
+ }
+ }
+
+ public function setClass($klass)
+ {
+ $this->klass = $klass;
+ }
+
+ public function getClass()
+ {
+ return $this->klass;
+ }
+
+ public function setLegacyClass($klass)
+ {
+ $this->legacy_klass = $klass;
+ }
+
+ public function getLegacyClass()
+ {
+ return $this->legacy_klass;
+ }
+
+ public function setOptions($options)
+ {
+ $this->options = $options;
+ }
+
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ public static function buildFromProto($proto, $file_proto, $containing)
+ {
+ $desc = new Descriptor();
+
+ $message_name_without_package = "";
+ $classname = "";
+ $legacy_classname = "";
+ $fullname = "";
+ GPBUtil::getFullClassName(
+ $proto,
+ $containing,
+ $file_proto,
+ $message_name_without_package,
+ $legacy_classname,
+ $classname,
+ $fullname);
+ $desc->setFullName($fullname);
+ $desc->setClass($classname);
+ $desc->setLegacyClass($legacy_classname);
+ $desc->setOptions($proto->getOptions());
+
+ foreach ($proto->getField() as $field_proto) {
+ $desc->addField(FieldDescriptor::buildFromProto($field_proto));
+ }
+
+ // Handle nested types.
+ foreach ($proto->getNestedType() as $nested_proto) {
+ $desc->addNestedType(Descriptor::buildFromProto(
+ $nested_proto, $file_proto, $message_name_without_package));
+ }
+
+ // Handle nested enum.
+ foreach ($proto->getEnumType() as $enum_proto) {
+ $desc->addEnumType(EnumDescriptor::buildFromProto(
+ $enum_proto, $file_proto, $message_name_without_package));
+ }
+
+ // Handle oneof fields.
+ $index = 0;
+ foreach ($proto->getOneofDecl() as $oneof_proto) {
+ $desc->addOneofDecl(
+ OneofDescriptor::buildFromProto($oneof_proto, $desc, $index));
+ $index++;
+ }
+
+ return $desc;
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php
new file mode 100644
index 0000000..419bbf4
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php
@@ -0,0 +1,179 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\Descriptor;
+use Google\Protobuf\Internal\FileDescriptor;
+use Google\Protobuf\Internal\FileDescriptorSet;
+use Google\Protobuf\Internal\MessageBuilderContext;
+use Google\Protobuf\Internal\EnumBuilderContext;
+
+class DescriptorPool
+{
+ private static $pool;
+ // Map from message names to sub-maps, which are maps from field numbers to
+ // field descriptors.
+ private $class_to_desc = [];
+ private $class_to_enum_desc = [];
+ private $proto_to_class = [];
+
+ public static function getGeneratedPool()
+ {
+ if (!isset(self::$pool)) {
+ self::$pool = new DescriptorPool();
+ }
+ return self::$pool;
+ }
+
+ public function internalAddGeneratedFile($data, $use_nested = false)
+ {
+ $files = new FileDescriptorSet();
+ $files->mergeFromString($data);
+ $file = FileDescriptor::buildFromProto($files->getFile()[0]);
+
+ foreach ($file->getMessageType() as $desc) {
+ $this->addDescriptor($desc);
+ }
+ unset($desc);
+
+ foreach ($file->getEnumType() as $desc) {
+ $this->addEnumDescriptor($desc);
+ }
+ unset($desc);
+
+ foreach ($file->getMessageType() as $desc) {
+ $this->crossLink($desc);
+ }
+ unset($desc);
+ }
+
+ public function addMessage($name, $klass)
+ {
+ return new MessageBuilderContext($name, $klass, $this);
+ }
+
+ public function addEnum($name, $klass)
+ {
+ return new EnumBuilderContext($name, $klass, $this);
+ }
+
+ public function addDescriptor($descriptor)
+ {
+ $this->proto_to_class[$descriptor->getFullName()] =
+ $descriptor->getClass();
+ $this->class_to_desc[$descriptor->getClass()] = $descriptor;
+ $this->class_to_desc[$descriptor->getLegacyClass()] = $descriptor;
+ foreach ($descriptor->getNestedType() as $nested_type) {
+ $this->addDescriptor($nested_type);
+ }
+ foreach ($descriptor->getEnumType() as $enum_type) {
+ $this->addEnumDescriptor($enum_type);
+ }
+ }
+
+ public function addEnumDescriptor($descriptor)
+ {
+ $this->proto_to_class[$descriptor->getFullName()] =
+ $descriptor->getClass();
+ $this->class_to_enum_desc[$descriptor->getClass()] = $descriptor;
+ $this->class_to_enum_desc[$descriptor->getLegacyClass()] = $descriptor;
+ }
+
+ public function getDescriptorByClassName($klass)
+ {
+ if (isset($this->class_to_desc[$klass])) {
+ return $this->class_to_desc[$klass];
+ } else {
+ return null;
+ }
+ }
+
+ public function getEnumDescriptorByClassName($klass)
+ {
+ if (isset($this->class_to_enum_desc[$klass])) {
+ return $this->class_to_enum_desc[$klass];
+ } else {
+ return null;
+ }
+ }
+
+ public function getDescriptorByProtoName($proto)
+ {
+ if (isset($this->proto_to_class[$proto])) {
+ $klass = $this->proto_to_class[$proto];
+ return $this->class_to_desc[$klass];
+ } else {
+ return null;
+ }
+ }
+
+ public function getEnumDescriptorByProtoName($proto)
+ {
+ $klass = $this->proto_to_class[$proto];
+ return $this->class_to_enum_desc[$klass];
+ }
+
+ private function crossLink(Descriptor $desc)
+ {
+ foreach ($desc->getField() as $field) {
+ switch ($field->getType()) {
+ case GPBType::MESSAGE:
+ $proto = $field->getMessageType();
+ $field->setMessageType(
+ $this->getDescriptorByProtoName($proto));
+ break;
+ case GPBType::ENUM:
+ $proto = $field->getEnumType();
+ $field->setEnumType(
+ $this->getEnumDescriptorByProtoName($proto));
+ break;
+ default:
+ break;
+ }
+ }
+ unset($field);
+
+ foreach ($desc->getNestedType() as $nested_type) {
+ $this->crossLink($nested_type);
+ }
+ unset($nested_type);
+ }
+
+ public function finish()
+ {
+ foreach ($this->class_to_desc as $klass => $desc) {
+ $this->crossLink($desc);
+ }
+ unset($desc);
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto.php
new file mode 100644
index 0000000..7cc689d
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto.php
@@ -0,0 +1,386 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes a message type.
+ *
+ * Generated from protobuf message <code>google.protobuf.DescriptorProto</code>
+ */
+class DescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ */
+ protected $name = '';
+ private $has_name = false;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
+ */
+ private $field;
+ private $has_field = false;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
+ */
+ private $extension;
+ private $has_extension = false;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
+ */
+ private $nested_type;
+ private $has_nested_type = false;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
+ */
+ private $enum_type;
+ private $has_enum_type = false;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
+ */
+ private $extension_range;
+ private $has_extension_range = false;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
+ */
+ private $oneof_decl;
+ private $has_oneof_decl = false;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
+ */
+ protected $options = null;
+ private $has_options = false;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
+ */
+ private $reserved_range;
+ private $has_reserved_range = false;
+ /**
+ * Reserved field names, which may not be used by fields in the same message.
+ * A given name may only be reserved once.
+ *
+ * Generated from protobuf field <code>repeated string reserved_name = 10;</code>
+ */
+ private $reserved_name;
+ private $has_reserved_name = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * @type \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $field
+ * @type \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $extension
+ * @type \Google\Protobuf\Internal\DescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $nested_type
+ * @type \Google\Protobuf\Internal\EnumDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $enum_type
+ * @type \Google\Protobuf\Internal\DescriptorProto\ExtensionRange[]|\Google\Protobuf\Internal\RepeatedField $extension_range
+ * @type \Google\Protobuf\Internal\OneofDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $oneof_decl
+ * @type \Google\Protobuf\Internal\MessageOptions $options
+ * @type \Google\Protobuf\Internal\DescriptorProto\ReservedRange[]|\Google\Protobuf\Internal\RepeatedField $reserved_range
+ * @type string[]|\Google\Protobuf\Internal\RepeatedField $reserved_name
+ * Reserved field names, which may not be used by fields in the same message.
+ * A given name may only be reserved once.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+ $this->has_name = true;
+
+ return $this;
+ }
+
+ public function hasName()
+ {
+ return $this->has_name;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getField()
+ {
+ return $this->field;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
+ * @param \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setField($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
+ $this->field = $arr;
+ $this->has_field = true;
+
+ return $this;
+ }
+
+ public function hasField()
+ {
+ return $this->has_field;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
+ * @param \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
+ $this->extension = $arr;
+ $this->has_extension = true;
+
+ return $this;
+ }
+
+ public function hasExtension()
+ {
+ return $this->has_extension;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getNestedType()
+ {
+ return $this->nested_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
+ * @param \Google\Protobuf\Internal\DescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setNestedType($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
+ $this->nested_type = $arr;
+ $this->has_nested_type = true;
+
+ return $this;
+ }
+
+ public function hasNestedType()
+ {
+ return $this->has_nested_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEnumType()
+ {
+ return $this->enum_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
+ * @param \Google\Protobuf\Internal\EnumDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setEnumType($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
+ $this->enum_type = $arr;
+ $this->has_enum_type = true;
+
+ return $this;
+ }
+
+ public function hasEnumType()
+ {
+ return $this->has_enum_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExtensionRange()
+ {
+ return $this->extension_range;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
+ * @param \Google\Protobuf\Internal\DescriptorProto\ExtensionRange[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExtensionRange($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ExtensionRange::class);
+ $this->extension_range = $arr;
+ $this->has_extension_range = true;
+
+ return $this;
+ }
+
+ public function hasExtensionRange()
+ {
+ return $this->has_extension_range;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOneofDecl()
+ {
+ return $this->oneof_decl;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
+ * @param \Google\Protobuf\Internal\OneofDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOneofDecl($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\OneofDescriptorProto::class);
+ $this->oneof_decl = $arr;
+ $this->has_oneof_decl = true;
+
+ return $this;
+ }
+
+ public function hasOneofDecl()
+ {
+ return $this->has_oneof_decl;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
+ * @return \Google\Protobuf\Internal\MessageOptions
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
+ * @param \Google\Protobuf\Internal\MessageOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MessageOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+
+ return $this;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getReservedRange()
+ {
+ return $this->reserved_range;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
+ * @param \Google\Protobuf\Internal\DescriptorProto\ReservedRange[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setReservedRange($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ReservedRange::class);
+ $this->reserved_range = $arr;
+ $this->has_reserved_range = true;
+
+ return $this;
+ }
+
+ public function hasReservedRange()
+ {
+ return $this->has_reserved_range;
+ }
+
+ /**
+ * Reserved field names, which may not be used by fields in the same message.
+ * A given name may only be reserved once.
+ *
+ * Generated from protobuf field <code>repeated string reserved_name = 10;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getReservedName()
+ {
+ return $this->reserved_name;
+ }
+
+ /**
+ * Reserved field names, which may not be used by fields in the same message.
+ * A given name may only be reserved once.
+ *
+ * Generated from protobuf field <code>repeated string reserved_name = 10;</code>
+ * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setReservedName($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->reserved_name = $arr;
+ $this->has_reserved_name = true;
+
+ return $this;
+ }
+
+ public function hasReservedName()
+ {
+ return $this->has_reserved_name;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php
new file mode 100644
index 0000000..82b5695
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php
@@ -0,0 +1,152 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\DescriptorProto;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.DescriptorProto.ExtensionRange</code>
+ */
+class ExtensionRange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 start = 1;</code>
+ */
+ protected $start = 0;
+ private $has_start = false;
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ */
+ protected $end = 0;
+ private $has_end = false;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
+ */
+ protected $options = null;
+ private $has_options = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $start
+ * Inclusive.
+ * @type int $end
+ * Exclusive.
+ * @type \Google\Protobuf\Internal\ExtensionRangeOptions $options
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 start = 1;</code>
+ * @return int
+ */
+ public function getStart()
+ {
+ return $this->start;
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 start = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setStart($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->start = $var;
+ $this->has_start = true;
+
+ return $this;
+ }
+
+ public function hasStart()
+ {
+ return $this->has_start;
+ }
+
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ * @return int
+ */
+ public function getEnd()
+ {
+ return $this->end;
+ }
+
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setEnd($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end = $var;
+ $this->has_end = true;
+
+ return $this;
+ }
+
+ public function hasEnd()
+ {
+ return $this->has_end;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
+ * @return \Google\Protobuf\Internal\ExtensionRangeOptions
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
+ * @param \Google\Protobuf\Internal\ExtensionRangeOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\ExtensionRangeOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+
+ return $this;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ExtensionRange::class, \Google\Protobuf\Internal\DescriptorProto_ExtensionRange::class);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php
new file mode 100644
index 0000000..8022151
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php
@@ -0,0 +1,122 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\DescriptorProto;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Range of reserved tag numbers. Reserved tag numbers may not be used by
+ * fields or extension ranges in the same message. Reserved ranges may
+ * not overlap.
+ *
+ * Generated from protobuf message <code>google.protobuf.DescriptorProto.ReservedRange</code>
+ */
+class ReservedRange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 start = 1;</code>
+ */
+ protected $start = 0;
+ private $has_start = false;
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ */
+ protected $end = 0;
+ private $has_end = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $start
+ * Inclusive.
+ * @type int $end
+ * Exclusive.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 start = 1;</code>
+ * @return int
+ */
+ public function getStart()
+ {
+ return $this->start;
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 start = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setStart($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->start = $var;
+ $this->has_start = true;
+
+ return $this;
+ }
+
+ public function hasStart()
+ {
+ return $this->has_start;
+ }
+
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ * @return int
+ */
+ public function getEnd()
+ {
+ return $this->end;
+ }
+
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setEnd($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end = $var;
+ $this->has_end = true;
+
+ return $this;
+ }
+
+ public function hasEnd()
+ {
+ return $this->has_end;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ReservedRange::class, \Google\Protobuf\Internal\DescriptorProto_ReservedRange::class);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php
new file mode 100644
index 0000000..c928fbe
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\DescriptorProto\ExtensionRange instead.
+ * @deprecated
+ */
+ class DescriptorProto_ExtensionRange {}
+}
+class_exists(DescriptorProto\ExtensionRange::class);
+@trigger_error('Google\Protobuf\Internal\DescriptorProto_ExtensionRange is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\DescriptorProto\ExtensionRange instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ReservedRange.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ReservedRange.php
new file mode 100644
index 0000000..e49e945
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ReservedRange.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\DescriptorProto\ReservedRange instead.
+ * @deprecated
+ */
+ class DescriptorProto_ReservedRange {}
+}
+class_exists(DescriptorProto\ReservedRange::class);
+@trigger_error('Google\Protobuf\Internal\DescriptorProto_ReservedRange is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\DescriptorProto\ReservedRange instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumBuilderContext.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumBuilderContext.php
new file mode 100644
index 0000000..0839728
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumBuilderContext.php
@@ -0,0 +1,63 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\EnumDescriptor;
+use Google\Protobuf\EnumValueDescriptor;
+
+class EnumBuilderContext
+{
+
+ private $descriptor;
+ private $pool;
+
+ public function __construct($full_name, $klass, $pool)
+ {
+ $this->descriptor = new EnumDescriptor();
+ $this->descriptor->setFullName($full_name);
+ $this->descriptor->setClass($klass);
+ $this->pool = $pool;
+ }
+
+ public function value($name, $number)
+ {
+ $value = new EnumValueDescriptor($name, $number);
+ $this->descriptor->addValue($number, $value);
+ return $this;
+ }
+
+ public function finalizeToPool()
+ {
+ $this->pool->addEnumDescriptor($this->descriptor);
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptor.php
new file mode 100644
index 0000000..7af4f84
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptor.php
@@ -0,0 +1,115 @@
+<?php
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\EnumValueDescriptor;
+
+class EnumDescriptor
+{
+ use HasPublicDescriptorTrait;
+
+ private $klass;
+ private $legacy_klass;
+ private $full_name;
+ private $value;
+ private $name_to_value;
+ private $value_descriptor = [];
+
+ public function __construct()
+ {
+ $this->public_desc = new \Google\Protobuf\EnumDescriptor($this);
+ }
+
+ public function setFullName($full_name)
+ {
+ $this->full_name = $full_name;
+ }
+
+ public function getFullName()
+ {
+ return $this->full_name;
+ }
+
+ public function addValue($number, $value)
+ {
+ $this->value[$number] = $value;
+ $this->name_to_value[$value->getName()] = $value;
+ $this->value_descriptor[] = new EnumValueDescriptor($value->getName(), $number);
+ }
+
+ public function getValueByNumber($number)
+ {
+ if (isset($this->value[$number])) {
+ return $this->value[$number];
+ }
+ return null;
+ }
+
+ public function getValueByName($name)
+ {
+ if (isset($this->name_to_value[$name])) {
+ return $this->name_to_value[$name];
+ }
+ return null;
+ }
+
+ public function getValueDescriptorByIndex($index)
+ {
+ if (isset($this->value_descriptor[$index])) {
+ return $this->value_descriptor[$index];
+ }
+ return null;
+ }
+
+ public function getValueCount()
+ {
+ return count($this->value);
+ }
+
+ public function setClass($klass)
+ {
+ $this->klass = $klass;
+ }
+
+ public function getClass()
+ {
+ return $this->klass;
+ }
+
+ public function setLegacyClass($klass)
+ {
+ $this->legacy_klass = $klass;
+ }
+
+ public function getLegacyClass()
+ {
+ return $this->legacy_klass;
+ }
+
+ public static function buildFromProto($proto, $file_proto, $containing)
+ {
+ $desc = new EnumDescriptor();
+
+ $enum_name_without_package = "";
+ $classname = "";
+ $legacy_classname = "";
+ $fullname = "";
+ GPBUtil::getFullClassName(
+ $proto,
+ $containing,
+ $file_proto,
+ $enum_name_without_package,
+ $classname,
+ $legacy_classname,
+ $fullname);
+ $desc->setFullName($fullname);
+ $desc->setClass($classname);
+ $desc->setLegacyClass($legacy_classname);
+ $values = $proto->getValue();
+ foreach ($values as $value) {
+ $desc->addValue($value->getNumber(), $value);
+ }
+
+ return $desc;
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php
new file mode 100644
index 0000000..f5c7fe1
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php
@@ -0,0 +1,231 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes an enum type.
+ *
+ * Generated from protobuf message <code>google.protobuf.EnumDescriptorProto</code>
+ */
+class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ */
+ protected $name = '';
+ private $has_name = false;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
+ */
+ private $value;
+ private $has_value = false;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
+ */
+ protected $options = null;
+ private $has_options = false;
+ /**
+ * Range of reserved numeric values. Reserved numeric values may not be used
+ * by enum values in the same enum declaration. Reserved ranges may not
+ * overlap.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code>
+ */
+ private $reserved_range;
+ private $has_reserved_range = false;
+ /**
+ * Reserved enum value names, which may not be reused. A given name may only
+ * be reserved once.
+ *
+ * Generated from protobuf field <code>repeated string reserved_name = 5;</code>
+ */
+ private $reserved_name;
+ private $has_reserved_name = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * @type \Google\Protobuf\Internal\EnumValueDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $value
+ * @type \Google\Protobuf\Internal\EnumOptions $options
+ * @type \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange[]|\Google\Protobuf\Internal\RepeatedField $reserved_range
+ * Range of reserved numeric values. Reserved numeric values may not be used
+ * by enum values in the same enum declaration. Reserved ranges may not
+ * overlap.
+ * @type string[]|\Google\Protobuf\Internal\RepeatedField $reserved_name
+ * Reserved enum value names, which may not be reused. A given name may only
+ * be reserved once.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+ $this->has_name = true;
+
+ return $this;
+ }
+
+ public function hasName()
+ {
+ return $this->has_name;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
+ * @param \Google\Protobuf\Internal\EnumValueDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumValueDescriptorProto::class);
+ $this->value = $arr;
+ $this->has_value = true;
+
+ return $this;
+ }
+
+ public function hasValue()
+ {
+ return $this->has_value;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
+ * @return \Google\Protobuf\Internal\EnumOptions
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
+ * @param \Google\Protobuf\Internal\EnumOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+
+ return $this;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
+ /**
+ * Range of reserved numeric values. Reserved numeric values may not be used
+ * by enum values in the same enum declaration. Reserved ranges may not
+ * overlap.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getReservedRange()
+ {
+ return $this->reserved_range;
+ }
+
+ /**
+ * Range of reserved numeric values. Reserved numeric values may not be used
+ * by enum values in the same enum declaration. Reserved ranges may not
+ * overlap.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code>
+ * @param \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setReservedRange($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange::class);
+ $this->reserved_range = $arr;
+ $this->has_reserved_range = true;
+
+ return $this;
+ }
+
+ public function hasReservedRange()
+ {
+ return $this->has_reserved_range;
+ }
+
+ /**
+ * Reserved enum value names, which may not be reused. A given name may only
+ * be reserved once.
+ *
+ * Generated from protobuf field <code>repeated string reserved_name = 5;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getReservedName()
+ {
+ return $this->reserved_name;
+ }
+
+ /**
+ * Reserved enum value names, which may not be reused. A given name may only
+ * be reserved once.
+ *
+ * Generated from protobuf field <code>repeated string reserved_name = 5;</code>
+ * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setReservedName($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->reserved_name = $arr;
+ $this->has_reserved_name = true;
+
+ return $this;
+ }
+
+ public function hasReservedName()
+ {
+ return $this->has_reserved_name;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php
new file mode 100644
index 0000000..949dd89
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php
@@ -0,0 +1,124 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\EnumDescriptorProto;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Range of reserved numeric values. Reserved values may not be used by
+ * entries in the same enum. Reserved ranges may not overlap.
+ * Note that this is distinct from DescriptorProto.ReservedRange in that it
+ * is inclusive such that it can appropriately represent the entire int32
+ * domain.
+ *
+ * Generated from protobuf message <code>google.protobuf.EnumDescriptorProto.EnumReservedRange</code>
+ */
+class EnumReservedRange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 start = 1;</code>
+ */
+ protected $start = 0;
+ private $has_start = false;
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ */
+ protected $end = 0;
+ private $has_end = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $start
+ * Inclusive.
+ * @type int $end
+ * Inclusive.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 start = 1;</code>
+ * @return int
+ */
+ public function getStart()
+ {
+ return $this->start;
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 start = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setStart($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->start = $var;
+ $this->has_start = true;
+
+ return $this;
+ }
+
+ public function hasStart()
+ {
+ return $this->has_start;
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ * @return int
+ */
+ public function getEnd()
+ {
+ return $this->end;
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setEnd($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end = $var;
+ $this->has_end = true;
+
+ return $this;
+ }
+
+ public function hasEnd()
+ {
+ return $this->has_end;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(EnumReservedRange::class, \Google\Protobuf\Internal\EnumDescriptorProto_EnumReservedRange::class);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto_EnumReservedRange.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto_EnumReservedRange.php
new file mode 100644
index 0000000..b1b59ed
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto_EnumReservedRange.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange instead.
+ * @deprecated
+ */
+ class EnumDescriptorProto_EnumReservedRange {}
+}
+class_exists(EnumDescriptorProto\EnumReservedRange::class);
+@trigger_error('Google\Protobuf\Internal\EnumDescriptorProto_EnumReservedRange is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumOptions.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumOptions.php
new file mode 100644
index 0000000..e650042
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumOptions.php
@@ -0,0 +1,172 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.EnumOptions</code>
+ */
+class EnumOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Set this option to true to allow mapping different tag names to the same
+ * value.
+ *
+ * Generated from protobuf field <code>optional bool allow_alias = 2;</code>
+ */
+ protected $allow_alias = false;
+ private $has_allow_alias = false;
+ /**
+ * Is this enum deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum, or it will be completely ignored; in the very least, this
+ * is a formalization for deprecating enums.
+ *
+ * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ protected $deprecated = false;
+ private $has_deprecated = false;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ private $uninterpreted_option;
+ private $has_uninterpreted_option = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $allow_alias
+ * Set this option to true to allow mapping different tag names to the same
+ * value.
+ * @type bool $deprecated
+ * Is this enum deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum, or it will be completely ignored; in the very least, this
+ * is a formalization for deprecating enums.
+ * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * The parser stores options it doesn't recognize here. See above.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Set this option to true to allow mapping different tag names to the same
+ * value.
+ *
+ * Generated from protobuf field <code>optional bool allow_alias = 2;</code>
+ * @return bool
+ */
+ public function getAllowAlias()
+ {
+ return $this->allow_alias;
+ }
+
+ /**
+ * Set this option to true to allow mapping different tag names to the same
+ * value.
+ *
+ * Generated from protobuf field <code>optional bool allow_alias = 2;</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowAlias($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_alias = $var;
+ $this->has_allow_alias = true;
+
+ return $this;
+ }
+
+ public function hasAllowAlias()
+ {
+ return $this->has_allow_alias;
+ }
+
+ /**
+ * Is this enum deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum, or it will be completely ignored; in the very least, this
+ * is a formalization for deprecating enums.
+ *
+ * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
+ * @return bool
+ */
+ public function getDeprecated()
+ {
+ return $this->deprecated;
+ }
+
+ /**
+ * Is this enum deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum, or it will be completely ignored; in the very least, this
+ * is a formalization for deprecating enums.
+ *
+ * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+ $this->has_deprecated = true;
+
+ return $this;
+ }
+
+ public function hasDeprecated()
+ {
+ return $this->has_deprecated;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUninterpretedOption($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
+ $this->has_uninterpreted_option = true;
+
+ return $this;
+ }
+
+ public function hasUninterpretedOption()
+ {
+ return $this->has_uninterpreted_option;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
new file mode 100644
index 0000000..3dd9558
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
@@ -0,0 +1,137 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes a value within an enum.
+ *
+ * Generated from protobuf message <code>google.protobuf.EnumValueDescriptorProto</code>
+ */
+class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ */
+ protected $name = '';
+ private $has_name = false;
+ /**
+ * Generated from protobuf field <code>optional int32 number = 2;</code>
+ */
+ protected $number = 0;
+ private $has_number = false;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
+ */
+ protected $options = null;
+ private $has_options = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * @type int $number
+ * @type \Google\Protobuf\Internal\EnumValueOptions $options
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+ $this->has_name = true;
+
+ return $this;
+ }
+
+ public function hasName()
+ {
+ return $this->has_name;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional int32 number = 2;</code>
+ * @return int
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional int32 number = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+ $this->has_number = true;
+
+ return $this;
+ }
+
+ public function hasNumber()
+ {
+ return $this->has_number;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
+ * @return \Google\Protobuf\Internal\EnumValueOptions
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
+ * @param \Google\Protobuf\Internal\EnumValueOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumValueOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+
+ return $this;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueOptions.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueOptions.php
new file mode 100644
index 0000000..9f9fb3b
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueOptions.php
@@ -0,0 +1,127 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.EnumValueOptions</code>
+ */
+class EnumValueOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Is this enum value deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum value, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating enum values.
+ *
+ * Generated from protobuf field <code>optional bool deprecated = 1 [default = false];</code>
+ */
+ protected $deprecated = false;
+ private $has_deprecated = false;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ private $uninterpreted_option;
+ private $has_uninterpreted_option = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $deprecated
+ * Is this enum value deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum value, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating enum values.
+ * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * The parser stores options it doesn't recognize here. See above.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Is this enum value deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum value, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating enum values.
+ *
+ * Generated from protobuf field <code>optional bool deprecated = 1 [default = false];</code>
+ * @return bool
+ */
+ public function getDeprecated()
+ {
+ return $this->deprecated;
+ }
+
+ /**
+ * Is this enum value deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum value, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating enum values.
+ *
+ * Generated from protobuf field <code>optional bool deprecated = 1 [default = false];</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+ $this->has_deprecated = true;
+
+ return $this;
+ }
+
+ public function hasDeprecated()
+ {
+ return $this->has_deprecated;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUninterpretedOption($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
+ $this->has_uninterpreted_option = true;
+
+ return $this;
+ }
+
+ public function hasUninterpretedOption()
+ {
+ return $this->has_uninterpreted_option;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
new file mode 100644
index 0000000..00fbebe
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
@@ -0,0 +1,74 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.ExtensionRangeOptions</code>
+ */
+class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ private $uninterpreted_option;
+ private $has_uninterpreted_option = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * The parser stores options it doesn't recognize here. See above.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUninterpretedOption($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
+ $this->has_uninterpreted_option = true;
+
+ return $this;
+ }
+
+ public function hasUninterpretedOption()
+ {
+ return $this->has_uninterpreted_option;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptor.php
new file mode 100644
index 0000000..98b516f
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptor.php
@@ -0,0 +1,284 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+namespace Google\Protobuf\Internal;
+
+class FieldDescriptor
+{
+ use HasPublicDescriptorTrait;
+
+ private $name;
+ private $json_name;
+ private $setter;
+ private $getter;
+ private $number;
+ private $label;
+ private $type;
+ private $message_type;
+ private $enum_type;
+ private $packed;
+ private $is_map;
+ private $oneof_index = -1;
+
+ public function __construct()
+ {
+ $this->public_desc = new \Google\Protobuf\FieldDescriptor($this);
+ }
+
+ public function setOneofIndex($index)
+ {
+ $this->oneof_index = $index;
+ }
+
+ public function getOneofIndex()
+ {
+ return $this->oneof_index;
+ }
+
+ public function setName($name)
+ {
+ $this->name = $name;
+ }
+
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ public function setJsonName($json_name)
+ {
+ $this->json_name = $json_name;
+ }
+
+ public function getJsonName()
+ {
+ return $this->json_name;
+ }
+
+ public function setSetter($setter)
+ {
+ $this->setter = $setter;
+ }
+
+ public function getSetter()
+ {
+ return $this->setter;
+ }
+
+ public function setGetter($getter)
+ {
+ $this->getter = $getter;
+ }
+
+ public function getGetter()
+ {
+ return $this->getter;
+ }
+
+ public function setNumber($number)
+ {
+ $this->number = $number;
+ }
+
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ public function setLabel($label)
+ {
+ $this->label = $label;
+ }
+
+ public function getLabel()
+ {
+ return $this->label;
+ }
+
+ public function isRepeated()
+ {
+ return $this->label === GPBLabel::REPEATED;
+ }
+
+ public function setType($type)
+ {
+ $this->type = $type;
+ }
+
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ public function setMessageType($message_type)
+ {
+ $this->message_type = $message_type;
+ }
+
+ public function getMessageType()
+ {
+ return $this->message_type;
+ }
+
+ public function setEnumType($enum_type)
+ {
+ $this->enum_type = $enum_type;
+ }
+
+ public function getEnumType()
+ {
+ return $this->enum_type;
+ }
+
+ public function setPacked($packed)
+ {
+ $this->packed = $packed;
+ }
+
+ public function getPacked()
+ {
+ return $this->packed;
+ }
+
+ public function isPackable()
+ {
+ return $this->isRepeated() && self::isTypePackable($this->type);
+ }
+
+ public function isMap()
+ {
+ return $this->getType() == GPBType::MESSAGE &&
+ !is_null($this->getMessageType()->getOptions()) &&
+ $this->getMessageType()->getOptions()->getMapEntry();
+ }
+
+ public function isTimestamp()
+ {
+ return $this->getType() == GPBType::MESSAGE &&
+ $this->getMessageType()->getClass() === "Google\Protobuf\Timestamp";
+ }
+
+ public function isWrapperType()
+ {
+ if ($this->getType() == GPBType::MESSAGE) {
+ $class = $this->getMessageType()->getClass();
+ return in_array($class, [
+ "Google\Protobuf\DoubleValue",
+ "Google\Protobuf\FloatValue",
+ "Google\Protobuf\Int64Value",
+ "Google\Protobuf\UInt64Value",
+ "Google\Protobuf\Int32Value",
+ "Google\Protobuf\UInt32Value",
+ "Google\Protobuf\BoolValue",
+ "Google\Protobuf\StringValue",
+ "Google\Protobuf\BytesValue",
+ ]);
+ }
+ return false;
+ }
+
+ private static function isTypePackable($field_type)
+ {
+ return ($field_type !== GPBType::STRING &&
+ $field_type !== GPBType::GROUP &&
+ $field_type !== GPBType::MESSAGE &&
+ $field_type !== GPBType::BYTES);
+ }
+
+ public static function getFieldDescriptor($proto)
+ {
+ $type_name = null;
+ $type = $proto->getType();
+ switch ($type) {
+ case GPBType::MESSAGE:
+ case GPBType::GROUP:
+ case GPBType::ENUM:
+ $type_name = $proto->getTypeName();
+ break;
+ default:
+ break;
+ }
+
+ $oneof_index = $proto->hasOneofIndex() ? $proto->getOneofIndex() : -1;
+ $packed = false;
+ $options = $proto->getOptions();
+ if ($options !== null) {
+ $packed = $options->getPacked();
+ }
+
+ $field = new FieldDescriptor();
+ $field->setName($proto->getName());
+
+ $json_name = $proto->hasJsonName() ? $proto->getJsonName() :
+ lcfirst(implode('', array_map('ucwords', explode('_', $proto->getName()))));
+ if ($proto->hasJsonName()) {
+ $json_name = $proto->getJsonName();
+ } else {
+ $proto_name = $proto->getName();
+ $json_name = implode('', array_map('ucwords', explode('_', $proto_name)));
+ if ($proto_name[0] !== "_" && !ctype_upper($proto_name[0])) {
+ $json_name = lcfirst($json_name);
+ }
+ }
+ $field->setJsonName($json_name);
+
+ $camel_name = implode('', array_map('ucwords', explode('_', $proto->getName())));
+ $field->setGetter('get' . $camel_name);
+ $field->setSetter('set' . $camel_name);
+ $field->setType($proto->getType());
+ $field->setNumber($proto->getNumber());
+ $field->setLabel($proto->getLabel());
+ $field->setPacked($packed);
+ $field->setOneofIndex($oneof_index);
+
+ // At this time, the message/enum type may have not been added to pool.
+ // So we use the type name as place holder and will replace it with the
+ // actual descriptor in cross building.
+ switch ($type) {
+ case GPBType::MESSAGE:
+ $field->setMessageType($type_name);
+ break;
+ case GPBType::ENUM:
+ $field->setEnumType($type_name);
+ break;
+ default:
+ break;
+ }
+
+ return $field;
+ }
+
+ public static function buildFromProto($proto)
+ {
+ return FieldDescriptor::getFieldDescriptor($proto);
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php
new file mode 100644
index 0000000..b231c9e
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php
@@ -0,0 +1,473 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes a field within a message.
+ *
+ * Generated from protobuf message <code>google.protobuf.FieldDescriptorProto</code>
+ */
+class FieldDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ */
+ protected $name = '';
+ private $has_name = false;
+ /**
+ * Generated from protobuf field <code>optional int32 number = 3;</code>
+ */
+ protected $number = 0;
+ private $has_number = false;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code>
+ */
+ protected $label = 0;
+ private $has_label = false;
+ /**
+ * If type_name is set, this need not be set. If both this and type_name
+ * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
+ *
+ * Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code>
+ */
+ protected $type = 0;
+ private $has_type = false;
+ /**
+ * For message and enum types, this is the name of the type. If the name
+ * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
+ * rules are used to find the type (i.e. first the nested types within this
+ * message are searched, then within the parent, on up to the root
+ * namespace).
+ *
+ * Generated from protobuf field <code>optional string type_name = 6;</code>
+ */
+ protected $type_name = '';
+ private $has_type_name = false;
+ /**
+ * For extensions, this is the name of the type being extended. It is
+ * resolved in the same manner as type_name.
+ *
+ * Generated from protobuf field <code>optional string extendee = 2;</code>
+ */
+ protected $extendee = '';
+ private $has_extendee = false;
+ /**
+ * For numeric types, contains the original text representation of the value.
+ * For booleans, "true" or "false".
+ * For strings, contains the default text contents (not escaped in any way).
+ * For bytes, contains the C escaped value. All bytes >= 128 are escaped.
+ * TODO(kenton): Base-64 encode?
+ *
+ * Generated from protobuf field <code>optional string default_value = 7;</code>
+ */
+ protected $default_value = '';
+ private $has_default_value = false;
+ /**
+ * If set, gives the index of a oneof in the containing type's oneof_decl
+ * list. This field is a member of that oneof.
+ *
+ * Generated from protobuf field <code>optional int32 oneof_index = 9;</code>
+ */
+ protected $oneof_index = 0;
+ private $has_oneof_index = false;
+ /**
+ * JSON name of this field. The value is set by protocol compiler. If the
+ * user has set a "json_name" option on this field, that option's value
+ * will be used. Otherwise, it's deduced from the field's name by converting
+ * it to camelCase.
+ *
+ * Generated from protobuf field <code>optional string json_name = 10;</code>
+ */
+ protected $json_name = '';
+ private $has_json_name = false;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.FieldOptions options = 8;</code>
+ */
+ protected $options = null;
+ private $has_options = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * @type int $number
+ * @type int $label
+ * @type int $type
+ * If type_name is set, this need not be set. If both this and type_name
+ * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
+ * @type string $type_name
+ * For message and enum types, this is the name of the type. If the name
+ * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping