crowdreactive / lob-bundle
A Symfony bundle for the Lob.com PHP SDK
2.0.0
2016-02-11 12:49 UTC
Requires
- php: ^5.5|^7.0
- lob/lob-php: ~1.6
- symfony/framework-bundle: ^2.6|^3.0
Requires (Dev)
- fabpot/php-cs-fixer: ^1.11
- phpunit/phpunit: ^4.8
This package is not auto-updated.
Last update: 2024-10-26 19:43:06 UTC
README
Encapsulates Lob.com's PHP SDK in a Symfony bundle for configuration.
Bundled at CrowdReactive, makers of EventsTag.
Usage
-
Install the bundle:
composer require crowdreactive/lob-bundle
-
Add it to AppKernel
class AppKernel { public function registerBundles() { $bundles = [ new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), // ... new CrowdReactive\LobBundle\CrowdReactiveLobBundle(), ]; } }
-
Configuration
crowd_reactive_lob: # Required api_key: abc123 # Optional version: 1.5.0 # A specific version of the API
-
Access the Lob service
The
Lob\Lob
instance is namedcrowd_reactive_lob.lob
in the dependency container. Access it with:$this->container->get('crowd_reactive_lob.lob');
my_postal_service: class: My\PostalService arguments: - "@crowd_reactive_lob.lob"
Contributing
PRs welcomed! Make sure to run the tests with composer run tests
.
License
This bundle is under the MIT license. See the complete license.