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


PHP HTTPClient::__construct方法代码示例

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


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

示例1: sprintf

		function __construct($accountid, $curl = null)
		{
			parent::__construct($curl);
			
			$ProfileURL = sprintf(self::PROFILE_URL_TEMPLATE, $accountid);

			$this->Fetch($ProfileURL);
			$this->AccountID = $accountid;
		}
开发者ID:rchicoria,项目名称:epp-drs,代码行数:9,代码来源:class.LinkedInProfile.php

示例2:

 /**
  * RPC Client Constructor
  * 
  * @param string hostname
  * @param string xml rpc username (optional)
  * @param string xml rpc password (optional)
  */
 function __construct($host, $user = "", $pass = "")
 {
     parent::__construct();
     $host = str_replace("http://", "", $host);
     if ($user) {
         $host = "{$user}:{$pass}@{$host}";
     }
     $this->Host = "http://{$host}";
 }
开发者ID:jasherai,项目名称:libwebta,代码行数:16,代码来源:class.RPCClient.php

示例3:

 /**
  * Constructor.
  *
  * @author Andreas Gohr <andi@splitbrain.org>
  */
 function __construct()
 {
     global $conf;
     // call parent constructor
     parent::__construct();
     // set some values from the config
     $this->proxy_host = $conf['proxy']['host'];
     $this->proxy_port = $conf['proxy']['port'];
     $this->proxy_user = $conf['proxy']['user'];
     $this->proxy_pass = $conf['proxy']['pass'];
     $this->proxy_ssl = $conf['proxy']['ssl'];
 }
开发者ID:krayon,项目名称:flyspray,代码行数:17,代码来源:HTTPClient.php

示例4: sprintf

		/**
		 * Constructor
		 * 
		 * @var int account ID
		 * @var resource CURL handler
		 */
		function __construct($accountid, $curl = null)
		{
			parent::__construct($curl);
			
			$ProfileURL = sprintf(self::PROFILE_URL_TEMPLATE, $accountid);
			
			$this->SetHeaders(array('Accept-Language: en-us,en;q=0.5'));
			
			$this->SetTimeouts(60, 30);
			$this->Fetch($ProfileURL);
			$this->AccountID = $accountid;
		}
开发者ID:rchicoria,项目名称:epp-drs,代码行数:18,代码来源:class.LiveJournalProfile.php

示例5:

 /**
  * Constructor.
  *
  * @author Andreas Gohr <andi@splitbrain.org>
  */
 function __construct()
 {
     global $conf;
     // call parent constructor
     parent::__construct();
     // set some values from the config
     $this->proxy_host = $conf['proxy']['host'];
     $this->proxy_port = $conf['proxy']['port'];
     $this->proxy_user = $conf['proxy']['user'];
     $this->proxy_pass = conf_decodeString($conf['proxy']['pass']);
     $this->proxy_ssl = $conf['proxy']['ssl'];
     $this->proxy_except = $conf['proxy']['except'];
     // allow enabling debugging via URL parameter (if debugging allowed)
     if ($conf['allowdebug']) {
         if (isset($_REQUEST['httpdebug']) || isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'httpdebug') !== false) {
             $this->debug = true;
         }
     }
 }
开发者ID:janzoner,项目名称:dokuwiki,代码行数:24,代码来源:HTTPClient.php

示例6:

		/**
		 * Constructor
		 */
		function __construct()
		{
			parent::__construct();
		}
开发者ID:rchicoria,项目名称:epp-drs,代码行数:7,代码来源:class.Facebook.php

示例7:

 /**
  * @param string $username API username allowed to post notification for this Manialink
  * @param string $password API password
  * @param string $manialink Short Manialink code
  */
 function __construct($username, $password, $manialink)
 {
     parent::__construct($username, $password);
     $this->manialink = $manialink;
 }
开发者ID:nadeolive-legacy,项目名称:trackmania-ws-sdk,代码行数:10,代码来源:ManiaHome.php

示例8:

 /**
  * Sets shorter timeout
  */
 function __construct()
 {
     parent::__construct();
     $this->timeout = 8;
     // slightly faster timeouts
 }
开发者ID:richmahn,项目名称:Door43,代码行数:9,代码来源:httpclient_mock.php

示例9: __construct

	/**
	 * Create the client.
	 * @param string $session_key if you haven't gotten a session key yet, leave
	 * this as null and then set it later by just directly accessing the
	 * $session_key member variable.
	 * @param bool   $desktop     set to true if you are a desktop client
	 */
	public function __construct($url, $api_key, $secret, $session_key = null, $desktop = false, $throw_errors = true) 
	{
	    parent::__construct();
	    
	    $this->URL 		= $url;
	    $this->Secret 	= $secret;
	    $this->SessionKey = $session_key;
	    $this->API_Key 	= $api_key;
	    $this->IsDesktop 	= $desktop;
	    $this->ThrowErrors = $throw_errors;
	    $this->IsLastCallSuccess = true;
	    $this->LastError = array();
	
		$this->ProfileFields = array("about_me", "affiliations", "birthday", "books",
		    "clubs", "current_location", "first_name", "gender", "hometown_location",
		    "hs_info", "interests", "last_name", "meeting_for", "meeting_sex", "pic",
		    "movies", "music", "name", "notes_count", "political", "profile_update_time",
		    "quote", "relationship_status", "religion", "school_info", "work_history", 
			"significant_other_id", "status", "timezone", "tv", "wall_count"	    
		);
		    
	    if ($this->DebugMode) 
	    {
			$this->CurID = 0;
			echo "
				<script type=\"text/javascript\">
				var types = ['params', 'xml', 'php', 'sxml'];
				function toggleDisplay(id, type) {
				  for each (var t in types) {
				    if (t != type || document.getElementById(t + id).style.display == 'block') {
				      document.getElementById(t + id).style.display = 'none';
				    } else {
				      document.getElementById(t + id).style.display = 'block';
				    }
				  }
				  return false;
				}
				</script>
			";
	    }
	}
开发者ID:rchicoria,项目名称:epp-drs,代码行数:48,代码来源:class.FacebookAPI.php

示例10:

		/**
		 * Constructor
		 * 
		 * @var int account ID
		 * @var resource CURL handler
		 */
		function __construct($accountid, $curl = null)
		{
			parent::__construct($curl);
			$this->AccountID = $accountid;
		}
开发者ID:rchicoria,项目名称:epp-drs,代码行数:11,代码来源:class.FacebookProfile.php


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