当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Http_Client::__construct方法代码示例

本文整理汇总了PHP中Zend_Http_Client::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Http_Client::__construct方法的具体用法?PHP Zend_Http_Client::__construct怎么用?PHP Zend_Http_Client::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Http_Client的用法示例。


在下文中一共展示了Zend_Http_Client::__construct方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructs Object with Server URL and Configs
  *
  * @param array
  */
 public function __construct($array = false)
 {
     if ($array != false) {
         $this->setTestMode($array[0]);
     }
     parent::__construct($this->getServerUrl(), $this->getConfig());
 }
开发者ID:nschoen,项目名称:magento-module,代码行数:12,代码来源:Communication.php

示例2: __construct

 /**
  * the constructor
  *
  * @param string $_uri the url to connect to
  * @param array $_config see Zend_Http_Client for details
  */
 public function __construct($_baseUri, array $_config = array())
 {
     $this->_baseUri = $_baseUri;
     $_config['useragent'] = 'PHP ajam remote client (rev: 0.2)';
     $_config['keepalive'] = TRUE;
     parent::__construct($_baseUri, $_config);
     // enable cookie handling
     $this->setCookieJar();
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:15,代码来源:Connection.php

示例3: __construct

 /**
  * Constructor; creates a new HTTP Client instance which itself is
  * just a typical Zend_Http_Client subclass with some OAuth icing to
  * assist in automating OAuth parameter generation, addition and
  * cryptographioc signing of requests.
  *
  * @param array $oauthOptions
  * @param string $uri
  * @param array|Zend_Config $config
  * @return void
  */
 public function __construct(array $oauthOptions, $uri = null, $config = null)
 {
     parent::__construct($uri, $config);
     $this->_config = new Zend_Oauth_Config();
     if (!is_null($oauthOptions)) {
         if ($oauthOptions instanceof Zend_Config) {
             $oauthOptions = $oauthOptions->toArray();
         }
         $this->_config->setOptions($oauthOptions);
     }
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:22,代码来源:Client.php

示例4:

 function __construct($username = null, $password = null)
 {
     parent::__construct();
     //magic headers for kinopoisk
     $this->setHeaders("Host", "www.kinopoisk.ru:80");
     $this->setHeaders("Accept", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg");
     $config['maxredirects'] = 5;
     $config['timeout'] = 300;
     $config['useragent'] = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 FirePHP/0.4';
     $this->setConfig($config);
 }
开发者ID:n3r,项目名称:parseKp,代码行数:11,代码来源:Client.php

示例5: __construct

 /**
  * Constructor; creates a new HTTP Client instance which itself is
  * just a typical Zend_Http_Client subclass with some OAuth icing to
  * assist in automating OAuth parameter generation, addition and
  * cryptographioc signing of requests.
  *
  * @param  array $oauthOptions
  * @param  string $uri
  * @param  array|Zend_Config $config
  * @return void
  */
 public function __construct($oauthOptions, $uri = null, $config = null)
 {
     if (!isset($config['rfc3986_strict'])) {
         $config['rfc3986_strict'] = true;
     }
     parent::__construct($uri, $config);
     $this->_config = new Zend_Oauth_Config();
     if ($oauthOptions !== null) {
         if ($oauthOptions instanceof Zend_Config) {
             $oauthOptions = $oauthOptions->toArray();
         }
         $this->_config->setOptions($oauthOptions);
     }
 }
开发者ID:mrwalruss,项目名称:thegioistatus,代码行数:25,代码来源:Client.php

示例6: __construct

 /**
  * Constructor method
  *
  * Expects a configuration parameter.
  *
  * @param Enlight_Config $config
  */
 public function __construct($config)
 {
     if (!empty($config->paypalSandbox)) {
         $url = self::URL_SANDBOX;
     } else {
         $url = self::URL_LIVE;
     }
     $this->apiUsername = $config->get('paypalUsername');
     $this->apiPassword = $config->get('paypalPassword');
     $this->apiSignature = $config->get('paypalSignature');
     $this->apiVersion = $config->get('paypalVersion');
     parent::__construct($url);
     $this->setAdapter(RestClient::createAdapterFromConfig($config));
 }
开发者ID:NikolaIvanovski,项目名称:SwagPaymentPaypal,代码行数:21,代码来源:Client.php

示例7: __construct

 /**
  * Constructor; creates a new HTTP Client instance which itself is
  * just a typical Zend_Http_Client subclass with some OAuth icing to
  * assist in automating OAuth parameter generation, addition and
  * cryptographioc signing of requests.
  *
  * @param  array|Zend_Config $oauthOptions
  * @param  string            $uri
  * @param  array|Zend_Config $config
  * @return void
  */
 public function __construct($oauthOptions, $uri = null, $config = null)
 {
     if ($config instanceof Zend_Config && !isset($config->rfc3986_strict)) {
         $config                   = $config->toArray();
         $config['rfc3986_strict'] = true;
     } else if (null === $config ||
                (is_array($config) && !isset($config['rfc3986_strict']))) {
         $config['rfc3986_strict'] = true;
     }
     parent::__construct($uri, $config);
     $this->_config = new Zend_Oauth_Config;
     if ($oauthOptions !== null) {
         if ($oauthOptions instanceof Zend_Config) {
             $oauthOptions = $oauthOptions->toArray();
         }
         $this->_config->setOptions($oauthOptions);
     }
 }
开发者ID:nhp,项目名称:shopware-4,代码行数:29,代码来源:Client.php

示例8: __construct

 public function __construct($uri = null, $config = null)
 {
     $this->config['useragent'] = 'Varien_Http_Client';
     parent::__construct($uri, $config);
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:5,代码来源:Client.php

示例9: __construct

 /**
  * コンストラクタ
  *
  * @param Zend_Uri_Http|string $uri
  * @param array $config Configuration key-value pairs.
  */
 public function __construct($uri = null, $config = null)
 {
     parent::__construct($uri, $config);
 }
开发者ID:noriotakei,项目名称:suraimu,代码行数:10,代码来源:ComHttp.php

示例10: __construct

 /**
  * Constructor method
  * 
  * Expects a configuration parameter.
  *
  * @param Enlight_Config $config
  */
 public function __construct($config)
 {
     if(!empty($config->paypalSandbox)) {
         $url = self::URL_SANDBOX;
     } else {
         $url = self::URL_LIVE;
     }
     $this->apiUsername = $config->get('paypalUsername');
     $this->apiPassword = $config->get('paypalPassword');
     $this->apiSignature = $config->get('paypalSignature');
     $this->apiVersion = $config->get('paypalVersion');
     parent::__construct($url, array(
         'useragent' => 'Shopware/' . Shopware()->Config()->Version,
         'timeout' => 5,
     ));
     if (extension_loaded('curl')) {
         $adapter = new Zend_Http_Client_Adapter_Curl();
         $adapter->setCurlOption(CURLOPT_SSL_VERIFYPEER, false);
         $adapter->setCurlOption(CURLOPT_SSL_VERIFYHOST, false);
         $this->setAdapter($adapter);
     }
 }
开发者ID:nhp,项目名称:shopware-4,代码行数:29,代码来源:Client.php

示例11: __construct

 /**
  * Constructor method
  *
  * Expects a configuration parameter.
  *
  * @param Enlight_Config $config
  */
 public function __construct($config)
 {
     $this->pluginConfig = $config;
     parent::__construct($this->getBaseUri());
     $this->setAdapter(self::createAdapterFromConfig($config));
 }
开发者ID:NikolaIvanovski,项目名称:SwagPaymentPaypal,代码行数:13,代码来源:RestClient.php

示例12: __construct

 public function __construct($baseApiUrl)
 {
     parent::__construct();
     $this->_baseApiUrl = $baseApiUrl;
     $this->assignApiKey()->assignTenant();
 }
开发者ID:olhsha,项目名称:OpenSKOS2tempMeertens,代码行数:6,代码来源:Api.php

示例13: __construct

 /**
  * Initializes Zend_Http_Client connection.
  *
  * @param   string  $base       api url
  * @param   integer $timeout    connection timeout
  * @param   string  $useragent  client user-agent
  */
 public function __construct($base, $timeout = 10, $useragent = 'jirafe-php-client')
 {
     $this->_base = rtrim($base, '/') . '/';
     $config = array('useragent' => $useragent, 'timeout' => $timeout);
     parent::__construct($this->_base, $config);
 }
开发者ID:nhienvo,项目名称:magento-plugin,代码行数:13,代码来源:Zend.php


注:本文中的Zend_Http_Client::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。