承接 google/gtfs-realtime-bindings 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

google/gtfs-realtime-bindings

最新稳定版本:0.0.2

Composer 安装命令:

composer require google/gtfs-realtime-bindings

包简介

PHP classes generated from the GTFS-realtime protocol buffer specification.

关键字:

README 文档

README

PHP version

Provides PHP classes generated from the GTFS-realtime Protocol Buffer specification. These classes will allow you to parse a binary Protocol Buffer GTFS-realtime data feed into PHP objects.

For bindings in other languages, see the gtfs-realtime-bindings project.

Add the Dependency

To use the gtfs-realtime-bindings-php classes in your own project, you need to first install the Packagist Composer package. To do so, add a dependency in your composer.json file:

"require": { "google/gtfs-realtime-bindings": "x.y.z" } 

Where x.y.z is the latest release version:

PHP version

Then update your Composer dependencies:

composer update 

Example Code

The following code snippet demonstrates downloading a GTFS-realtime data feed from a particular URL, parsing it as a FeedMessage (the root type of the GTFS-realtime schema), and iterating over the results.

require_once 'vendor/autoload.php';  use transit_realtime\FeedMessage;  $data = file_get_contents("URL OF YOUR GTFS-REALTIME SOURCE GOES HERE"); $feed = new FeedMessage(); $feed->parse($data); foreach ($feed->getEntityList() as $entity) {  if ($entity->hasTripUpdate()) {  error_log("trip: " . $entity->getId());  } }

For more details on the naming conventions for the PHP classes generated from the gtfs-realtime.proto, check out the the gtfs-realtime.php source file.

统计信息

  • 总下载量: 128.46k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 27
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 27
  • Watchers: 15
  • Forks: 18
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固