Exemplo n.º 1
0
 protected function _initApiClient()
 {
     $options = $this->getOptions();
     try {
         $client = new Cosmos_Api_Client($options['cosmos']['api']);
         Zend_Registry::set('api', $client->getProxy());
     } catch (Exception $e) {
         Zend_Registry::get('log')->err($e);
     }
 }
Exemplo n.º 2
0
 /**
  * Magic __call method that calls the underlying API client
  * 
  * @param string $method
  * @param array $arguments
  */
 public function __call($method, $arguments)
 {
     $method = ltrim("{$this->_namespace}.{$method}", '.');
     return $this->_client->call($method, $arguments);
 }