Download the PHP package risan/sl without Composer

On this page you can find all versions of the php package risan/sl. 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 sl

Stockholm Pulic Transport

Build Status HHVM Status StyleCI Scrutinizer Code Quality Code Coverage SensioLabs Insight Latest Stable Version License

PHP HTTP client library for communicating with sl.se—a Stockholm public transportation website.

Table of Contents

Dependencies

This package relies on the following libraries to work:

All above dependencies will be automatically downloaded if you are using Composer to install this package.

Installation

To install this library using Composer, simply run the following command inside your project directory:

Or you may also add risan\sl package into your composer.json file like so:

And don't forget to run the following composer command to install this library:

Basic Usage

Here is some basic example to use this library:

Search for Station

To search for a station, you may use the searchStation() method:

For example, if you'd like to find all stations that match the central word, then your code will look like this:

The searchStation() method will automatically perform a HTTP request to sl.se to search for stations that match the given $query. This method will return an instance of Sl\Collections\StationCollection class, which contains a collection of Sl\Station instances.

The StationCollection class itself is a subclass of Illuminate\Support\Collection, so you may leverage the powerful feature of Laravel's collection.

Find Departures

You may also find departures from a specific station using departuresFrom() method:

This method will perform a HTTP request to sl.se website in order to find a list of departures for a given $station. Note that this method requires an argument that must be instance of Sl\Station class.

For example, if you need to find all departures from Slussen station, you can do the following:

The $departures will be an instance of Sl\Collections\DepartureCollection which hold a collection of Sl\Departure instances. The DepartureCollection is also a subclass of Illuminate\Support\Collection.

Bus Departures

To filter only the bus departures, call busses method:

Train Departures

To filter only the train (pendeltåg) departures, call trains() method:

Metro Departures

To filter only the metro (tunnelbana) departures, call metros() method:

Tram Departures

To filter only the tram (spårvagn) departures, call trams() method:

Light Rail Departures

To filter only the light rail (lokalbana) departures, call lightRails() method:

Ship Departures

To filter only the ship or boat departures, call ships() method:


All versions of sl with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.1
illuminate/support Version ^5.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 risan/sl contains the following files

Loading the files please wait ....