PHPackages                             aaron4m/zf2-mailchimp - 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. aaron4m/zf2-mailchimp

ActiveLibrary[API Development](/categories/api)

aaron4m/zf2-mailchimp
=====================

A Mailchimp 1.3 API module for Zend Framework 2.0

74503[1 issues](https://github.com/aaron4m/zf2-mailchimp/issues)PHP

Since Sep 27Pushed 12y ago2 watchersCompare

[ Source](https://github.com/aaron4m/zf2-mailchimp)[ Packagist](https://packagist.org/packages/aaron4m/zf2-mailchimp)[ RSS](/packages/aaron4m-zf2-mailchimp/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

ZF2 Mailchimp 1.3 API Wrapper
=============================

[](#zf2-mailchimp-13-api-wrapper)

This module is an attempt to create a complete mailchimp API wrapper for Zend Framework 2.0 At the moment, this is loosely based on

\*This is very much a work in progress and functionality will be added as I have time and/or need.

Updates
-------

[](#updates)

12/04/2013 - Major overhaul of service/mapper architecture. 14/04/2013 - Rewrote the submit mechanism and cleaned up subscriber service.

Contributing
------------

[](#contributing)

If you want to see this module move along faster, please feel free to pick a section, start coding and submit pull requests! I'm interested in contributions for

- Unit Tests
- Add other sections not yet completed
- Code improvements (I'm still learning, so would appreciate feedback)

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

[](#installation)

1. Add the following requirement to your projects composer.json file.

```
"aaron4m/zf2-mailchimp": "dev-master"
```

2. Open up your command line and run

```
php ./composer.phar update

```

3. Copy vendor/aaron4m/zf2-mailchimp/config/mailchimp.local.php.dist to your /config/autoload folder and rename it to mailchimp.local.php
4. You *must* add your API key to this file and configure any global settings.

Usage Examples
==============

[](#usage-examples)

Subscribe (Single)
------------------

[](#subscribe-single)

```
$mailchimp = $this->getServiceLocator()->get('subscriber');

$mailchimp->email('me@here.com.au')
  ->listId('29bc73c393')
  ->emailType('html')
  ->subscribe();
```

Subscribe (Bulk)
----------------

[](#subscribe-bulk)

```
$mailchimp = $this->getServiceLocator()->get('subscriber');

$mailchimp->listId('12345')
  ->batch(array(
    array('EMAIL'=>'me@here.com', 'EMAIL_TYPE'=>'html', 'FNAME'=>'Aaron'),
    array('EMAIL'=>'me2@here.com', 'EMAIL_TYPE'=>'html', 'FNAME'=>'Bill'),
  ))
  ->subscribe();
```

Unsubscribe (Single)
--------------------

[](#unsubscribe-single)

```
$mailchimp = $this->getServiceLocator()->get('subscriber');

$mailchimp->email('me@here.com.au')
    ->listId('29bc73c393')
    ->unsubscribe();
```

Unsubscribe (Bulk)
------------------

[](#unsubscribe-bulk)

```
$mailchimp = $this->getServiceLocator()->get('subscriber');

$subscribe->listId('29bc73c393')
  ->batch(array('me@here.com', 'me2@here.com'))
  ->unsubscribe();
```

Update (Single)
---------------

[](#update-single)

```
$mailchimp = $this->getServiceLocator()->get('subscriber');

$mailchimp->listId('12345')
  ->email('me@here.com')
  ->mergeVars(array(
    array('FNAME'=>'Aaron'),
  ))
  ->update();
```

Update (Bulk)
-------------

[](#update-bulk)

```
$mailchimp = $this->getServiceLocator()->get('subscriber');

$mailchimp->listId('12345')
  ->batch(array(
    array('EMAIL'=>'me@here.com', 'FNAME'=>'Aaron'),
    array('EMAIL'=>'me2@here.com', 'FNAME'=>'Billy'),
  ))
  ->update();
```

Get Member Info (Single)
------------------------

[](#get-member-info-single)

- You can return this as an array or a subscriber entity

```
$mailchimp = $this->getServiceLocator()->get('subscriber');

$subscriberDetails = $mailchimp->email('aaron@4mation.com.au')
  ->listId('29bc73c393')
  ->get();
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/335268e9ef408185a955d86c198669761984e623d7b72c37b757b4ed5a9cd526?d=identicon)[aaron4m](/maintainers/aaron4m)

---

Top Contributors

[![aweathe](https://avatars.githubusercontent.com/u/980325?v=4)](https://github.com/aweathe "aweathe (2 commits)")[![tdutrion](https://avatars.githubusercontent.com/u/1712222?v=4)](https://github.com/tdutrion "tdutrion (1 commits)")

### Embed Badge

![Health badge](/badges/aaron4m-zf2-mailchimp/health.svg)

```
[![Health](https://phpackages.com/badges/aaron4m-zf2-mailchimp/health.svg)](https://phpackages.com/packages/aaron4m-zf2-mailchimp)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
