Skip to content
Symfony2 bundle to query the OpenData Transport API
PHP
Find file
Pull request Compare This branch is 26 commits behind thormeier:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
DependencyInjection
Entity
Exception
Repository
Resources/config
Service
Tests
Util
.travis.yml
README.md
ThormeierTransportClientBundle.php
composer.json
composer.lock
phpunit.xml.dist

README.md

ThormeierTransportClientBundle

Build Status

Introduction

This bundle provides simple access to the OpenData Transport API in Symfony2. The Transport API provides Swiss public transport data, that is converted into instances of Doctrine-like entity classes within this bundle for further usage.

<?php

$transportClient = $this->container->get('transport.client');

This bundle provides a new transport.client service that returns an instance of Thormeier\TransportClientBundle\Service\Transport

Installation

Step 1: Composer require

Add the Github repository to your composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/thormeier/transport-client"
        }
    ],
    "require": {
        "thormeier/transport-client": "dev-master"
    }
}

Step2: Enable the bundle in the kernel

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Thormeier\TransportClientBundle\ThormeierTransportClientBundle(),
        // ...
    );
}
Something went wrong with that request. Please try again.