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.
Table of contents
Download maegnes/zf2xmlapisendeffect
More information about maegnes/zf2xmlapisendeffect
Files in maegnes/zf2xmlapisendeffect
Download maegnes/zf2xmlapisendeffect
More information about maegnes/zf2xmlapisendeffect
Files in maegnes/zf2xmlapisendeffect
Vendor maegnes
Package zf2xmlapisendeffect
Short Description ZF2 module which integrates the sendeffect xml api into your zf2 application
License BSD-3-Clause
Homepage https://github.com/maegnes/ZF2XmlApiSendeffect
Package zf2xmlapisendeffect
Short Description ZF2 module which integrates the sendeffect xml api into your zf2 application
License BSD-3-Clause
Homepage https://github.com/maegnes/ZF2XmlApiSendeffect
Please rate this library. Is it a good library?
Informations about the package zf2xmlapisendeffect
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
zendframework/zendframework Version >=2.1.0
openlss/lib-array2xml Version 0.0.9
The package maegnes/zf2xmlapisendeffect contains the following files
Loading the files please wait ...