2017 © Pedro PelĂĄez
 

symfony-bundle dolist-bundle

Implementation of Dolist library for Symfony2

image

mremi/dolist-bundle

Implementation of Dolist library for Symfony2

  • Thursday, January 8, 2015
  • by mremi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 343 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 9 % Grown

The README.md

MremiDolistBundle

SensioLabsInsight, (*1)

Build Status Total Downloads Latest Stable Version, (*2)

This bundle implements the Dolist library for Symfony2., (*3)

License

This bundle is available under the MIT license., (*4)

Prerequisites

This version of the bundle requires Symfony 2.1+., (*5)

Basic Docs, (*6)

, (*7)

Installation

Installation is a quick 3 step process:, (*8)

  1. Download MremiDolistBundle using composer
  2. Enable the Bundle
  3. Configure the MremiDolistBundle

Step 1: Download MremiDolistBundle using composer

Add MremiDolistBundle in your composer.json:, (*9)

{
    "require": {
        "mremi/dolist-bundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:, (*10)

``` bash $ php composer.phar update mremi/dolist-bundle, (*11)


Composer will install the bundle to your project's `vendor/mremi` directory. ### Step 2: Enable the bundle Enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Mremi\DolistBundle\MremiDolistBundle(), ); }

Step 3: Configure the MremiDolistBundle

The bundle comes with a sensible default configuration, which is listed below. However you have to configure at least your account identifier and authentication key., (*12)

# app/config/config.yml
mremi_dolist:
    api:
        # mandatory
        account_id:         your_account_identifier
        authentication_key: your_authentication_key

        # optional, default values are:
        authentication:
            wsdl:    http://api.dolist.net/v2/AuthenticationService.svc?wsdl
            options:
                soap_version:       1 # SOAP_1_1
                proxy_host:         ~
                proxy_port:         ~
                proxy_login:        ~
                proxy_password:     ~
                compression:        ~
                encoding:           ~
                trace:              %kernel.debug%
                classmap:           ~
                exceptions:         ~
                connection_timeout: 2
                typemap:            ~
                cache_wsdl:         ~
                user_agent:         ~
                stream_context:     ~
                features:           ~
                keep_alive:         ~
            retries: 1

        # optional, default values are:
        contact:
            wsdl:          http://api.dolist.net/v2/ContactManagementService.svc?wsdl
            options:
                soap_version:       1 # SOAP_1_1
                proxy_host:         ~
                proxy_port:         ~
                proxy_login:        ~
                proxy_password:     ~
                compression:        ~
                encoding:           ~
                trace:              %kernel.debug%
                classmap:           ~
                exceptions:         ~
                connection_timeout: 2
                typemap:            ~
                cache_wsdl:         ~
                user_agent:         ~
                stream_context:     ~
                features:           ~
                keep_alive:         ~
            retries: 1

, (*13)

Add/update a contact

Two services allow you to add or update a contact, to use like this:, (*14)

<?php

$contactManager = $container->get('mremi_dolist.api.contact_manager');
$fieldManager = $container->get('mremi_dolist.api.field_manager');

$contact = $contactManager->create();
$contact->setEmail('test@example.com');
$contact->addField($fieldManager->create('firstname', 'Firstname'));
$contact->addField($fieldManager->create('lastname', 'Lastname'));

$ticket = $contactManager->save($contact);

$saved = $contactManager->getStatusByTicket($ticket);

if ($saved->isOk()) {
    // contact has been saved...
} else {
    // something is wrong...
    echo sprintf('Returned code: %s, description: %s', $saved->getReturnCode(), $saved->getDescription());
}

, (*15)

Retrieve contacts

<?php

use Mremi\Dolist\Contact\GetContactRequest;

$contactManager = $container->get('mremi_dolist.api.contact_manager');

$request = new GetContactRequest;
$request->setOffset(50);
// ...

$contacts = $contactManager->getContacts($request);

, (*16)

Contribution

Any question or feedback? Open an issue and I will try to reply quickly., (*17)

A feature is missing here? Feel free to create a pull request to solve it!, (*18)

I hope this has been useful and has helped you. If so, share it and recommend it! :), (*19)

@mremitsme, (*20)

The Versions

08/01 2015

dev-master

9999999-dev https://github.com/mremi/DolistBundle

Implementation of Dolist library for Symfony2

  Sources   Download

MIT

The Requires

 

by RĂ©mi Marseille

api symfony2 soap crm dolist

20/07 2013

v1.0.0

1.0.0.0 https://github.com/mremi/DolistBundle

Implementation of Dolist library for Symfony2

  Sources   Download

MIT

The Requires

 

by RĂ©mi Marseille

api soap crm dolist