PHP code example of bigfoot / ecircle-bundle

1. Go to this page and download the library: Download bigfoot/ecircle-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bigfoot / ecircle-bundle example snippets


// src/Bigfoot/Bundle/EcircleBundle/Options/SubscribeMemberByEmailOptions.php

namespace Bigfoot\Bundle\EcircleBundle\Options;

class subscribeMemberByEmailOptions
{
    public $email;
    public $groupId;
    public $session;
    public $sendMessage = false;


}

// src/Bigfoot/Bundle/EcircleBundle/Services/BigfootEcircleClient.php
public function subscribeMemberByEmail($email,$groupId)
{

    if (!$this->sessionId) {
        throw new Exception('Client no connected');
    }

    $subscribeMemberByEmailOptions = $this->options('SubscribeMemberByEmail');

    $subscribeMemberByEmailOptions->email   = $email;
    $subscribeMemberByEmailOptions->session = $this->sessionId;
    $subscribeMemberByEmailOptions->groupId = $groupId;

    $result = $this->client->subscribeMemberByEmail($subscribeMemberByEmailOptions);

    return $result;
}

// Controller/DefaultController.php
$client = $this->get('bigfoot_ecircle.client')->connect('account_1');
$retour = $client->subscribeMemberByEmail('[email protected]','99');
$client->disconnect();
 shell
php composer.phar update