phpDocumentor http
transfer
[ class tree: http ] [ index: http ] [ all elements ]

Class: AbstractWindHttp

Source Location: /http/transfer/AbstractWindHttp.php

Class AbstractWindHttp

Descendants
Child Class Description
WindHttpSocket socket操作
WindHttpCurl Enter description here ...
WindHttpStream Enter description here ...

[ Top ]
Property Summary
static WindHttp   $instance  
string   $cookie  
array   $data  
string   $eno  
string   $err  
array   $header  
resource   $httpResource  
string   $timeout  
array   $url  

[ Top ]
Method Summary
static string   buildArray()   以指定分隔符的形式来将数组转化成字符串
static string   buildQuery()   构请查询字符串
static WindHttp   getInstance()   获取http单例对象,对象唯一访问入口
AbstractWindHttp   __construct()   声明受保护的构造函数,避免在类的外界实例化
void   clear()   请空数据,重新发送请求
void   close()   关闭请求
string   get()   get方式传值
void   getError()   取得http通信中的错误
httpResource   open()   打开一个http请求
string   post()   发送post请求
boolean   request()   发送请求
boolean   requestByArray()   以数组格式请求
string   resonseLine()   响应用户请求,只返回一行数据
string   response()   响应用户的请求
string   send()   发送请求底层操作
void   setCookie()   设置cookie
boolean   setCookies()   批量设置要传送的cookie
void   setData()   设置data
boolean   setDatas()   批量设置要传送的数据
void   setHeader()   设置http头
boolean   setHeaders()   批量设置http头
void   setUrl()   设置url
void   __clone()   防止克隆

[ Top ]
Properties
static WindHttp   $instance = null [line 16]
API Tags:
Access:  protected


[ Top ]
string   $cookie = array() [line 26]
API Tags:
Access:  protected


[ Top ]
array   $data = array() [line 38]
API Tags:
Access:  protected


[ Top ]
string   $eno = 0 [line 47]
API Tags:
Access:  protected


[ Top ]
string   $err = '' [line 43]
API Tags:
Access:  protected


[ Top ]
array   $header = array() [line 30]
API Tags:
Access:  protected


[ Top ]
resource   $httpResource = null [line 21]
API Tags:
Access:  protected


[ Top ]
string   $timeout = 0 [line 52]
API Tags:
Access:  protected


[ Top ]
array   $url = '' [line 34]
API Tags:
Access:  protected


[ Top ]
Methods
static method buildArray  [line 244]

  static string buildArray( array $array, [strin $sep = ':']  )

以指定分隔符的形式来将数组转化成字符串

Parameters:
array   $array:  关联数组
strin   $sep:  分隔符

API Tags:
Access:  public


[ Top ]
static method buildQuery  [line 227]

  static string buildQuery( array $query, [string $sep = '&']  )

构请查询字符串

Parameters:
array   $query:  查询的关联数组
string   $sep:  分隔符

API Tags:
Access:  public


[ Top ]
static method getInstance  [line 149]

  static WindHttp getInstance( [string $url = '']  )

获取http单例对象,对象唯一访问入口

Parameters:
string   $url:  请求的url

API Tags:
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
Constructor __construct  [line 73]

  AbstractWindHttp __construct( [string $url = ''], [ $timeout = 5]  )

声明受保护的构造函数,避免在类的外界实例化

Parameters:
string   $url: 
   $timeout: 

API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
clear  [line 214]

  void clear( )

请空数据,重新发送请求


API Tags:
Access:  public


[ Top ]
close  [line 138]

  void close( )

关闭请求


API Tags:
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
get  [line 97]

  string get( [string $url = ''], [array $data = array()], [array $header = array()], [array $cookie = array()], [array $options = array()]  )

get方式传值

Parameters:
string   $url:  请求的url
array   $data:  请求的数据
array   $header:  发送请求的头
array   $cookie:  发送的cookie
array   $options:  额外的请求头

API Tags:
Return:  返回页根据请求的响应页面
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
getError  [line 142]

  void getError( )

取得http通信中的错误


API Tags:
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
open  [line 110]

  httpResource open( )

打开一个http请求


API Tags:
Return:  http请求指针
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
post  [line 87]

  string post( [string $url = ''], [array $data = array()], [array $header = array()], [array $cookie = array()], [array $options = array()]  )

发送post请求

Parameters:
string   $url:  请求的url
array   $data:  请求的数据
array   $header:  发送请求的头
array   $cookie:  发送的cookie
array   $options:  额外的请求头

API Tags:
Return:  返回页根据请求的响应页面
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
request  [line 117]

  boolean request( string $key, [string $value = null]  )

发送请求

Parameters:
string   $key:  请求的名称
string   $value:  请求的值

API Tags:
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
requestByArray  [line 123]

  boolean requestByArray( [array $request = array()]  )

以数组格式请求

Parameters:
array   $request: 

API Tags:
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
resonseLine  [line 133]

  string resonseLine( )

响应用户请求,只返回一行数据


API Tags:
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
response  [line 128]

  string response( )

响应用户的请求


API Tags:
Return:  返回响应
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
send  [line 104]

  string send( [string $method = self::GET], [array $options = array()]  )

发送请求底层操作

Parameters:
string   $method:  请求方式
array   $options:  额外的主求参数

API Tags:
Return:  返回页根据请求的响应页面
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
setCookie  [line 184]

  void setCookie( string $key, string $value  )

设置cookie

Parameters:
string   $key: 
string   $value: 

API Tags:
Access:  public


[ Top ]
setCookies  [line 192]

  boolean setCookies( [array $cookies = array()]  )

批量设置要传送的cookie

Parameters:
array   $cookies:  要传送的cookie,数组的值基于key/value形式

API Tags:
Access:  public


[ Top ]
setData  [line 200]

  void setData( string $key, string $value  )

设置data

Parameters:
string   $key: 
string   $value: 

API Tags:
Access:  public


[ Top ]
setDatas  [line 208]

  boolean setDatas( [array $datas = array()]  )

批量设置要传送的数据

Parameters:
array   $datas:  要传送的数据,数组的值基于key/value形式

API Tags:
Access:  public


[ Top ]
setHeader  [line 168]

  void setHeader( string $key, string $value  )

设置http头

Parameters:
string   $key: 
string   $value: 

API Tags:
Access:  public


[ Top ]
setHeaders  [line 176]

  boolean setHeaders( [ $headers = array()], array $datas  )

批量设置http头

Parameters:
array   $datas:  实际的http头,数组的值基于key/value形式
   $headers: 

API Tags:
Access:  public


[ Top ]
setUrl  [line 160]

  void setUrl( string|array $url  )

设置url

Parameters:
string|array   $url: 

API Tags:
Access:  public


[ Top ]
__clone  [line 154]

  void __clone( )

防止克隆


API Tags:
Access:  protected


[ Top ]
Constants
GET = 'GET' [line 67]

[ Top ]
POST = 'POST' [line 68]

[ Top ]
_COOKIE = 'cookie' [line 57]

[ Top ]
_DATA = 'data' [line 65]

[ Top ]
_HEADER = 'header' [line 61]

[ Top ]

Documentation generated on Fri, 30 Mar 2012 11:43:25 +0800 by phpDocumentor 1.4.4