petsdeli / aftership-bundle
This package is abandoned and no longer maintained.
No replacement package was suggested.
Offers an easy Symfony DI integration for the official AfterShip PHP SDK.
Package info
github.com/pets-deli/aftership-bundle
Type:symfony-bundle
pkg:composer/petsdeli/aftership-bundle
v1.0.0
2017-05-24 16:32 UTC
Requires
- php: >=5.6
- aftership/aftership-php-sdk: ^5.0
This package is not auto-updated.
Last update: 2018-06-29 20:31:10 UTC
README
This Symfony bundle offers an easy DI integration for the official AfterShip PHP SDK. The different APIs are exposed as dedicated services.
Installation
- Run the following command to install the bundle
composer require petsdeli/aftership-bundle
- Configure the AfterShip API key and enable the APIs you want to use in your application
# app/config/config.yml pets_deli_aftership: key: f0604c1e-db72-425d-83b1-4958c85c6b67 couriers: true trackings: true notifications: false last_check_point: false
Usage
Get your configured services from the container
/** @var \AfterShip\Couriers $couriers */ $couriers = $container->get('aftership.couriers'); $response = $couriers->detect('EL722485543US');
or inject them in your services as you see fit.
<service id="app.consumer_command" class="AppBundle\Command\TrackingCommand"> <argument type="service" id="aftership.trackings" /> <tag name="console.command" /> </service>