Exemplo n.º 1
0
 /**
  * Constructor
  *
  * Sets up the Summon API Client
  *
  * @param string $apiId   Summon API ID
  * @param string $apiKey  Summon API Key
  * @param array  $options Associative array of additional options; legal keys:
  *    <ul>
  *      <li>authedUser - is the end-user authenticated?</li>
  *      <li>debug - boolean to control debug mode</li>
  *      <li>host - base URL of Summon API</li>
  *      <li>sessionId - Summon session ID to apply</li>
  *      <li>version - API version to use</li>
  *    </ul>
  */
 public function __construct($apiId, $apiKey, $options = array())
 {
     parent::__construct($apiId, $apiKey, $options);
     $this->client = new HTTP_Request(null, array('useBrackets' => false));
 }
Exemplo n.º 2
0
 /**
  * Constructor
  *
  * Sets up the Summon API Client
  *
  * @param string           $apiId   Summon API ID
  * @param string           $apiKey  Summon API Key
  * @param array            $options Associative array of additional options;
  * legal keys:
  *    <ul>
  *      <li>authedUser - is the end-user authenticated?</li>
  *      <li>debug - boolean to control debug mode</li>
  *      <li>host - base URL of Summon API</li>
  *      <li>sessionId - Summon session ID to apply</li>
  *      <li>version - API version to use</li>
  *    </ul>
  * @param Zend_Http_Client $client  HTTP client object (optional)
  */
 public function __construct($apiId, $apiKey, $options = array(), $client = null)
 {
     parent::__construct($apiId, $apiKey, $options);
     $this->client = is_object($client) ? $client : new HttpClient();
 }
Exemplo n.º 3
0
 /**
  * Print a message if debug is enabled.
  *
  * @param string $msg Message to print
  *
  * @return void
  */
 protected function debugPrint($msg)
 {
     if ($this->logger) {
         $this->logger->debug("{$msg}\n");
     } else {
         parent::debugPrint($msg);
     }
 }