PHPackages                             webit/gls-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. webit/gls-bundle

ActiveSymfony-bundle[API Development](/categories/api)

webit/gls-bundle
================

GLS ADE and GLS Track &amp; Trace API Symfony 2 integration

2.0.0(7y ago)22.3k↓50%21MITPHPPHP &gt;=5.3.2

Since Sep 21Pushed 7y ago1 watchersCompare

[ Source](https://github.com/dbojdo/gls-bundle)[ Packagist](https://packagist.org/packages/webit/gls-bundle)[ Docs](http://www.web-it.eu)[ RSS](/packages/webit-gls-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (1)

[![Build Status](https://camo.githubusercontent.com/d1363d152e1b04e82eb966371c5f2336fbeaf269d612c9783d008915da4c76f1/68747470733a2f2f6170692e7472617669732d63692e6f72672f64626f6a646f2f676c732d62756e646c652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/dbojdo/gls-bundle)

WebitGlsBundle
==============

[](#webitglsbundle)

GLS ADE and GLS Track &amp; Trace API Symfony 2 integration

Installation
------------

[](#installation)

### via Composer

[](#via-composer)

Add the **webit/gls-bundle** into **composer.json**

```
{
    "require": {
        "php":              ">=5.3.2",
        "webit/gls-bundle": "dev-master"
    },
    "autoload": {
        "psr-0": {
            "Acme": "src/"
        }
    }
}
```

### Register bundle in Kernel

[](#register-bundle-in-kernel)

Add following lines:

```
// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new Webit\Bundle\SoapApiBundle\WebitSoapApiBundle(),
    new Webit\Bundle\GlsBundle\WebitGlsBundle(),
    // ...
);
```

Configuration
-------------

[](#configuration)

You can define as much accounts as you need (ADE Accounts and Track &amp; Trace as well)

```
webit_gls:
   ade_accounts:
       my-production-account:
           username: my-ade-username
           password: my-ade-password
           test_mode: false
       my-test-account:
           username: my-ade-test-username
           password: my-ade-test-password
           test_mode: true
      track_accounts:
          my-account:
              username: my-track-and-trace-username
              password: my-track-and-trace-password
              test_mode: false
```

Usage
-----

[](#usage)

To use GLS APIs you need ***AccountManager*** ('webit\_gls.account\_manager'), ***ApiProvider*** ('webit\_gls.api\_provider'), and ***TrackingUrlProvider*** ('webit\_gls.tracking.url\_provider'). You can get them directly from Service Container or inject them to your class.

```
