示例#1
0
 /**
  * Call system.listMethods()
  *
  * @param  array  $method
  * @return array  array(method, method, method...)
  */
 public function fetchSMD()
 {
     $request = new Zend_Json_Server_Request();
     $request->setVersion('2.0');
     $request->setId(1);
     $this->_smd = new Zend_Json_Client_SMD();
     $this->_client->doRequest($request, $this->_smd);
 }
示例#2
0
 /**
  * constructor for Zend_Service_Tine20
  * @param string           $url         the url of the Tine 2.0 installation
  * @param Zend_Http_Client $httpClient
  * @return void
  */
 public function __construct($url, $httpClient = null)
 {
     $this->_url = $url;
     if (!$httpClient instanceof Zend_Http_Client) {
         $httpClient = new Zend_Http_Client();
     }
     if (!$httpClient->getCookieJar() instanceof Zend_Http_CookieJar) {
         $httpClient->setCookieJar();
     }
     parent::__construct($url, $httpClient);
 }
 /**
  * Call a method in this namespace.
  *
  * @param  string $methodN
  * @param  array $args
  * @return mixed
  */
 public function __call($method, $args)
 {
     $method = ltrim("{$this->_namespace}.{$method}", '.');
     return $this->_client->call($method, $args);
 }