2017 © Pedro Peláez
 

symfony-bundle campaign-monitor-bundle

Campaign Monitor Bundle for Symfony 2

image

lukaszmordawski/campaign-monitor-bundle

Campaign Monitor Bundle for Symfony 2

  • Tuesday, December 5, 2017
  • by LukaszMordawski
  • Repository
  • 2 Watchers
  • 3 Stars
  • 5,233 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 1 Open issues
  • 1 Versions
  • 9 % Grown

The README.md

CampaignMonitorBundle

This bundle was make, when I needed to use REST API wrapper for Campaign Monitor (campaignmonitor/createsend-php). That was some work to have it connected to Symfony 2, so I decided to publish results. This bundle will allow you to easy use that API, without care about exact class names and needed parameters. BTW. This is first Symfony 2 vendor bundle I ever made. Every notes, ideas and bugfixes are welcome., (*1)

Installation

Require lukaszmordawski/campaign-monitor-bundle into your composer.json file:, (*2)

``` json { "require": { "lukaszmordawski/campaign-monitor-bundle": "1.0.x-dev" } }, (*3)


Then include bundle in your kernel: ``` php # app/AppKernel.php public function registerBundles() { $bundles = array( # ... new LukaszMordawski\CampaignMonitorBundle\LukaszMordawskiCampaignMonitorBundle() ); }

The last step is to do some configuration in your app/config/config.yml file:, (*4)

``` yml, (*5)

app/config/config.yml

lukasz_mordawski_campaign_monitor: api_key: YOUR_API_KEY client_id: YOUR_CLIENT_ID // don't worry, you can pass another on making API call, if needed cache_service_id: CACHE_SERVICE_ID // optional, default cache is already configured in the bundle cache_lifetime: CACHE_LIFETIME // optional, default value is 3600 (1 hour), (*6)


Usage: ------ ``` php # src/Acme/DefaultBundle/Controller/DefaultController.php ... use LukaszMordawski\CampaignMonitorBundle\Helper\FactoryArguments; ... $arguments = new FactoryArguments; // by this object you can pass various parameters $arguments->endpoint = 'clients'; $data = $this->get('campaign_monitor.invoker') ->invoke($arguments, 'getCampaigns'); ...

If wrapper method need any parameters you can pass them as array as third parameter of invoke() method. This bundle is only facade to original library to make it easy to use with Symfony 2 project, so for any questions regarding API or wrappers please refer to original package docs, (*7)

The Versions

05/12 2017

dev-master

9999999-dev

Campaign Monitor Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

by Lukasz Mordawski

campaign monitor createsend bundle symfony2