Download the PHP package maegnes/zf2xmlapisendeffect without Composer

On this page you can find all versions of the php package maegnes/zf2xmlapisendeffect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zf2xmlapisendeffect

Build Status

ZF2XmlApiSendeffect

ZF2 module which integrates the sendeffect xml api into your application

Installation via Composer

Just add the following dependency to your composer.json file and add the module "ZF2XmlApiSendeffect" to your modules list in the application.config.php.

{
    "require": {
        "maegnes/zf2xmlapisendeffect": ">=1.0.0"
    }
}

Then, add the following structure to your application config:

<?php
return array(
    'ZF2XmlApiSendeffect' => array(
        'apiUrl' => 'The https Endpoint of the API',
        'username'  => 'Your API Username',
        'usertoken' => 'Your API Usertoken'
    )
);

Available Services

AddSubscriberToList

Adds a subscriber to a defined sendeffect subscriber list.

Usage

<?php

// Inside your zf2 application, just fetch the service by the service manager

/** \ZF2XmlApiSendeffect\Service\AddSubscriberToList $emailService */
$emailService = $this->getServiceManager()->get('sendeffect_add_subscriber_to_list');

// Set the email address of the subscriber and the target list id
$emailService->setEmailAddress('[email protected]');
$emailService->setMailingList(233);

// Then, add optional defined fields
$name = array(
    'fieldid' => 12,
    'value' => 'John'
);

$surname = array(
    'fieldid' => 13,
    'value' => 'Doe'
);

$emailService->addCustomFields([$name, $surname]);

# Finally call the api

/** \ZF2XmlApiSendeffect\Api\Response\ResponseInterface $response */
$response = $emailService->send();

if ($response->isSuccess()) {
    # Your logic
}

DeleteSubscriber

Deletes a subscriber from the given list

Usage

<?php

// Inside your zf2 application, just fetch the service by the service manager

/** \ZF2XmlApiSendeffect\Service\DeleteSubscriber $emailService */
$emailService = $this->getServiceManager()->get('sendeffect_delete_subscriber');

// Set the email address of the subscriber and the target list id
$emailService->setEmailAddress('[email protected]');
$emailService->setMailingList(233);

# Finally call the api

/** \ZF2XmlApiSendeffect\Api\Response\ResponseInterface $response */
$response = $emailService->send();

if ($response->isSuccess()) {
    # Your logic
}

GetSubscribers

Returns all subscribers from a given subscriber list

Usage

<?php

// Inside your zf2 application, just fetch the service by the service manager

/** \ZF2XmlApiSendeffect\Service\GetSubscribers $emailService */
$emailService = $this->getServiceManager()->get('sendeffect_get_subscribers');

// For instance its possible to search for all @yahoo.com mail addresses
$emailService->setEmailAddress('@yahoo.com');
$emailService->setMailingList(233);

# Finally call the api

/** \ZF2XmlApiSendeffect\Api\Response\GetSubscribersResponse $response */
$response = $emailService->send();

if ($response->isSuccess()) {

    # Your logic

    // Get the subscribers count
    $count = $response->getCount();

    // Get the subscribers
    $subscribers = $response->getSubscribers();
}

IsSubscriberOnList

Checks if the given user is on the given subscribers list

Usage

<?php

// Inside your zf2 application, just fetch the service by the service manager

/** \ZF2XmlApiSendeffect\Service\IsSubscriberOnList $emailService */
$emailService = $this->getServiceManager()->get('sendeffect_is_subscriber_on_list');

// Check if the user [email protected] is on the mailing list 233
$emailService->setEmailAddress('[email protected]');
$emailService->setMailingList(233);

# Finally call the api

/** \ZF2XmlApiSendeffect\Api\Response\IsSubscriberOnListResponse $response */
$response = $emailService->send();

if ($response->isSuccess()) {

    # Your logic

    $userExists = $response->userExists(); # true/false

}

All versions of zf2xmlapisendeffect with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
zendframework/zendframework Version >=2.1.0
openlss/lib-array2xml Version 0.0.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package maegnes/zf2xmlapisendeffect contains the following files

Loading the files please wait ...