Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 927 Bytes

Readme.md

File metadata and controls

37 lines (31 loc) · 927 Bytes

phpgtfs

phpgtfs is a data modeling and object writer for General Transit Feed Specification (GTFS).

Installation

Install with Composer

Usage

$agencies = new \cookieguru\phpgtfs\gtfs\Agencies();

$agency = new \cookieguru\phpgtfs\model\Agency();
$agency->agency_name = 'Demo agency';
$agency->agency_url = 'http://localhost/';
$agency->agency_timezone = 'America/Los_Angeles';
$agency->agency_lang = 'en';

$agencies->add($agency);

Then simply

\cookieguru\phpgtfs\Writer::write('gtfs/', $agencies);

and an agencies.txt file will be placed in the gtfs folder. Note that even unspecified columns will be written:

agency_id,agency_name,agency_url,agency_timezone,agency_lang,agency_phone,agency_fare_url
,"Demo agency",http://localhost/,America/Los_Angeles,en,,

License

MIT