示例#1
0
 public function __construct(\Mailchimp $chimp)
 {
     # make the passed Mailchimp instance available to the class
     $this->chimp = $chimp;
     # grab the standard lists array so we can access the list id's
     $this->lists = Lister::getLists();
 }
 /**
  * add an array of form fields to a specified Mailchimp form
  */
 public function addFieldsToList($listName, $fields = [])
 {
     $lister = new SubscriberList($this->chimp);
     return $lister->addListFields($listName, $fields);
 }