public function __construct() { $curl = new Zend_Http_Client_Adapter_Curl(); $curl->setCurlOption(CURLOPT_SSL_VERIFYHOST, false); $curl->setCurlOption(CURLOPT_SSL_VERIFYPEER, false); $client = new Zend_Http_Client(null, array('adapter' => $curl)); parent::__construct(null, $client); }
/** * Constructor * * @param string $serverurl a Moodle URL * @param string $token the token used to do the web service call */ public function __construct($serverurl, $token) { global $CFG; $this->serverurl = $serverurl; $serverurl = $serverurl . '?wstoken=' . $token; parent::__construct($serverurl); if (!empty($CFG->proxyhost) && !is_proxybypass($serverurl)) { $config = array('adapter' => 'Zend_Http_Client_Adapter_Proxy', 'proxy_host' => $CFG->proxyhost, 'proxy_user' => !empty($CFG->proxyuser) ? $CFG->proxyuser : null, 'proxy_pass' => !empty($CFG->proxypassword) ? $CFG->proxypassword : null); if (!empty($CFG->proxyport)) { $config['proxy_port'] = $CFG->proxyport; } $this->getHttpClient()->setConfig($config); } }
public function __construct() { $curl = new Zend_Http_Client_Adapter_Curl(); $curl->setCurlOption(CURLOPT_SSL_VERIFYHOST, false); $curl->setCurlOption(CURLOPT_SSL_VERIFYPEER, false); /*$curl->setCurlOption(CURLOPT_FOLLOWLOCATION,true); $curl->setCurlOption(CURLOPT_PROTOCOLS,array( CURLPROTO_HTTP | CURLPROTO_HTTPS )); $curl->setCurlOption(CURLOPT_REDIR_PROTOCOLS,array( CURLPROTO_HTTP | CURLPROTO_HTTPS )); $curl->setCurlOption(CURLOPT_MAXREDIRS,30);*/ $client = new Zend_Http_Client(null, array('adapter' => $curl)); parent::__construct(null, $client); }
/** * Create a new XML-RPC client to a remote server * * @param string $server Full address of the WebService * (e.g. http://www.streamwide.com/xmlrpc.php) * @param array|Zend_Config|mixed $options configuration on this client instance * @param Zend_Http_Client $httpClient HTTP Client to use for requests * * @return void */ public function __construct($server, $options = null, Zend_Http_Client $httpClient = null) { parent::__construct($server, $httpClient); if (null !== $options) { if (is_string($options)) { $options = $this->_loadConfig($options); } elseif ($options instanceof Zend_Config) { $options = $options->toArray(); } elseif (!is_array($options)) { throw new Streamwide_Exception('Invalid options provided; must be location of config file, a config object, or an array'); } $this->_options = $options; if (isset($this->_options['auth']) && is_array($this->_options['auth'])) { $this->setAuth($this->_options['auth']); } if (isset($this->_options['introspection']) && is_array($this->_options['introspection'])) { $introspector = new Streamwide_Web_Webservice_Introspection_Ini($this, $this->_options['introspection']); $this->setIntrospector($introspector); } } $this->setSkipSystemLookup(); }
/** * Constructor * * @param string $serverurl a Moodle URL * @param string $token the token used to do the web service call */ public function __construct($serverurl, $token) { $this->serverurl = $serverurl; $serverurl = $serverurl . '?wstoken=' . $token; parent::__construct($serverurl); }
/** * Constructor * @param string $serverurl * @param array $auth */ public function __construct($serverurl, $auth) { $this->serverurl = $serverurl; $this->set_auth($auth); parent::__construct($this->_serverAddress); }
public function __construct($server, Zend_Http_Client $httpClient = null) { $this->setSkipSystemLookup(true); parent::__construct($server, $httpClient); }
/** * Constructor * * @param string $url * * @return void */ public function __construct($url) { $this->_url = $url; parent::__construct($url); }
/** * コンストラクタ * * @param string $server Full address of the XML-RPC service * (e.g. http://time.xmlrpc.com/RPC2) * @param Zend_Http_Client $httpClient HTTP Client to use for requests */ public function __construct($server, $httpClient = null) { parent::__construct($server, $httpClient); }