Download the PHP package miklcct/rail_open_timetable_data without Composer

On this page you can find all versions of the php package miklcct/rail_open_timetable_data. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rail_open_timetable_data

Library for handling rail open timetable data

This is a library which includes parsers, repositories and models for handling rail open timetable data.

Currently only CIF format is supported, however, JSON format (from Network Rail) parser can be added in the future.

Migration from v1 to v2

v2 is a complete rewrite of the library, which is not backwards compatible, including the database schema. It is not possible to use a database from the old library, a new import process is required.

Summary of model changes

In v2, a Schedule is an entry in the timetable data, which has a Period of operation and TimingPoints. By instantiating it with a Date, an actual train Service is formed where actual real-world timestamps can be calculated.

A Service, at its own, represents a single portion and contains the timing points of that portion. The fields $divideFrom, $joinTo, $divides, $joins links this portion to other portions of the same service.

If a service divides into two portions, $divides will contain two elements, even though one of the portions will retain the same UID. The calling points of $this will only contain the calling points before the train splits, where the remaining calls after the division will be in the Services in the $divides array.

If a service is a result of division from a multi-portion service, $divideFrom will be non-null, which allows referencing back to the parent service.

The processing of associations is also simplified as well, AssociationWithService binds the services together with the calling index on the primary service. This library no longer do any time-based processing to find portions.

The ServiceProperty is also accumulated through the timing points instead of only set when it is changed.

The $timingPoints of a service may not start from 0, in case it is the primary portion after train division. The index is for the through service of the same UID, counted across all joining / dividing operations.

The location and station models are simplified as well, and now there are only two classes: Location (which represents a generic location) and Station (which represents a station listed in the station file, with interchange times, etc.).

Other main changes

The caching of MongoDB departure boards has been removed. Clients are advised to implement their own caching if needed.

There is a new class, RepositoryInterface, which binds all the different repository together and provides a method to query / set the date for the whole database.

Support for ambiguous station names has been added. It is possible to enter a station name without the bracketed suffix. If there is a location with the exact match, it is returned. Otherwise, an error is thrown if it is ambiguous.


All versions of rail_open_timetable_data with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
thecodingmachine/safe Version ^2.1
mongodb/mongodb Version ^2.0
ext-mongodb Version *
psr/simple-cache Version ^1.0
symfony/cache Version ^6.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package miklcct/rail_open_timetable_data contains the following files

Loading the files please wait ...