本文整理汇总了PHP中Zend_XmlRpc_Client::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_XmlRpc_Client::__construct方法的具体用法?PHP Zend_XmlRpc_Client::__construct怎么用?PHP Zend_XmlRpc_Client::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_XmlRpc_Client
的用法示例。
在下文中一共展示了Zend_XmlRpc_Client::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
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);
}
示例2: __construct
/**
* 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);
}
}
示例3: __construct
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);
}
示例4: __construct
/**
* 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();
}
示例5: __construct
/**
* 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);
}
示例6: __construct
/**
* Constructor
* @param string $serverurl
* @param array $auth
*/
public function __construct($serverurl, $auth)
{
$this->serverurl = $serverurl;
$this->set_auth($auth);
parent::__construct($this->_serverAddress);
}
示例7: __construct
public function __construct($server, Zend_Http_Client $httpClient = null)
{
$this->setSkipSystemLookup(true);
parent::__construct($server, $httpClient);
}
示例8: __construct
/**
* Constructor
*
* @param string $url
*
* @return void
*/
public function __construct($url)
{
$this->_url = $url;
parent::__construct($url);
}
示例9: __construct
/**
* コンストラクタ
*
* @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);
}