2017 © Pedro Peláez
 

library chimpdrill

Simple Mailchimp / Mandrill Merge Tags Parser

image

florian-koerner/chimpdrill

Simple Mailchimp / Mandrill Merge Tags Parser

  • Monday, March 19, 2018
  • by KoernerWS
  • Repository
  • 1 Watchers
  • 5 Stars
  • 7,134 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 4 Versions
  • 3 % Grown

The README.md

ChimpDrill - Merge Tag Parser

Build Status Scrutinizer Code Quality Coverage Status SensioLabsInsight, (*1)

Parser for the merge tags syntax of Mailchimp and Mandrill. Supports placeholder, filters and conditions., (*2)

Installation

Download ChimpDrill by using composer:, (*3)

``` bash php composer.phar require florian-koerner/chimpdrill:dev-master, (*4)


Or add the code below to your `composer.json`: ``` json { "require": { "florian-koerner/chimpdrill": "dev-master" } }

Usage

``` php $chimpdrill = new \FlorianKoerner\ChimpDrill\ChimpDrill($message, $placeholder);, (*5)

var_dump((string) $chimpdrill); // or var_dump($chimpdrill->getParsed());, (*6)



## Example **Message:** ``` html

Hi *|NAME|*

*|IF:CUSTOMER|* We want your money! *|ELSE:|* We wish you all the best. *|END:IF|* , (*7)

*|IF:INVOICE_COUNT == 0|* All invoices payed. You are the best! *|ELSEIF:INVOICE_COUNT , (*8)

  • The current year is: *|DATE:Y|*
  • Current weather: *|UPPER:WEATHER|*
  • Best movie ever: *|TITLE:MOVIE|*

Parameters: ``` php array( 'NAME' => 'John Doe', 'CUSTOMER' => true, 'INVOICE_COUNT' => 18, 'WEATHER' => 'rainy', 'MOVIE' => 'The last song' ), (*9)


**Result:** ``` html

Hi John Doe

We want your money! , (*10)

Are you kidding? , (*11)

  • The current year is: 2014
  • Current weather: RAINY
  • Best movie ever: The Last Song

I Love Open Source

I Love Open Source, (*12)

The Versions

19/03 2018

dev-master

9999999-dev

Simple Mailchimp / Mandrill Merge Tags Parser

  Sources   Download

CC0-1.0

The Requires

  • php >= 5.3.2

 

The Development Requires

by Florian Körner

18/11 2014

v1.2.0

1.2.0.0

Simple Mailchimp / Mandrill Merge Tags Parser

  Sources   Download

CC0-1.0

The Requires

  • php >= 5.3.2

 

The Development Requires

by Florian Körner

18/11 2014

v1.1.2

1.1.2.0

Simple Mailchimp / Mandrill Merge Tags Parser

  Sources   Download

CC0-1.0

The Requires

  • php >= 5.3.2

 

The Development Requires

by Florian Körner

26/09 2014

1.1.1

1.1.1.0

Simple Mailchimp / Mandrill Merge Tags Parser

  Sources   Download

CC0-1.0

The Requires

  • php >= 5.3.2

 

The Development Requires

by Florian Körner