PHP 클래스 Remote

저자: Kevin Hutchinson ([email protected])
상속: extends Relating_model, implements Modelled, implements Persisted, implements Validated
파일 보기 프로젝트 열기: getkirby/toolkit 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$defaults configuration

보호된 프로퍼티들

프로퍼티 타입 설명
$headers all received headers
$options all options for the request
$response store for the response object

공개 메소드들

메소드 설명
__construct ( string $url, array $options = [] ) Constructor
delete ( string $url, array $params = [] ) : object Static method to send a DELETE request
get ( string $url, array $params = [] ) : object Static method to send a GET request
head ( string $url, array $params = [] ) : object Static method to send a HEAD request
headers ( string $url, array $params = [] ) : array Static method to send a HEAD request which only returns an array of headers
options ( ) : array Returns all options which have been set for the current request
post ( string $url, array $params = [] ) : object Static method to send a POST request
put ( string $url, array $params = [] ) : object Static method to send a PUT request
request ( string $url, array $params = [] ) : object Static method to init this class and send a request
response ( ) : object Returns the response object for the current request

보호된 메소드들

메소드 설명
header ( object $curl, string $header ) : integer Used by curl to parse incoming headers
postfields ( mixed $data ) : mixed Internal method to handle post field data
send ( ) : object Sets up all curl options and sends the request

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( string $url, array $options = [] )
$url string
$options array

delete() 공개 정적인 메소드

Static method to send a DELETE request
public static delete ( string $url, array $params = [] ) : object
$url string
$params array
리턴 object Response

get() 공개 정적인 메소드

Static method to send a GET request
public static get ( string $url, array $params = [] ) : object
$url string
$params array
리턴 object Response

head() 공개 정적인 메소드

Static method to send a HEAD request
public static head ( string $url, array $params = [] ) : object
$url string
$params array
리턴 object Response

header() 보호된 메소드

Used by curl to parse incoming headers
protected header ( object $curl, string $header ) : integer
$curl object the curl connection
$header string the header line
리턴 integer the length of the heade

headers() 공개 정적인 메소드

Static method to send a HEAD request which only returns an array of headers
public static headers ( string $url, array $params = [] ) : array
$url string
$params array
리턴 array

options() 공개 메소드

Returns all options which have been set for the current request
public options ( ) : array
리턴 array

post() 공개 정적인 메소드

Static method to send a POST request
public static post ( string $url, array $params = [] ) : object
$url string
$params array
리턴 object Response

postfields() 보호된 메소드

Internal method to handle post field data
protected postfields ( mixed $data ) : mixed
$data mixed
리턴 mixed

put() 공개 정적인 메소드

Static method to send a PUT request
public static put ( string $url, array $params = [] ) : object
$url string
$params array
리턴 object Response

request() 공개 정적인 메소드

Static method to init this class and send a request
public static request ( string $url, array $params = [] ) : object
$url string
$params array
리턴 object Response

response() 공개 메소드

Returns the response object for the current request
public response ( ) : object
리턴 object Response

send() 보호된 메소드

Sets up all curl options and sends the request
protected send ( ) : object
리턴 object Response

프로퍼티 상세

$defaults 공개적으로 정적으로 프로퍼티

configuration
public static $defaults

$headers 보호되어 있는 프로퍼티

all received headers
protected $headers

$options 보호되어 있는 프로퍼티

all options for the request
protected $options

$response 보호되어 있는 프로퍼티

store for the response object
protected $response