PHP 클래스 VCR\Request

상속: extends Guzzle\Http\Message\EntityEnclosingRequest
파일 보기 프로젝트 열기: php-vcr/php-vcr 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$body string
$curlOptions array
$headers array
$method string
$postFields array
$postFiles array
$url string

공개 메소드들

메소드 설명
__construct ( string $method, string $url, array $headers = [] )
addPostFile ( array $file )
fromArray ( array $request ) : Request Creates a new Request from a specified array.
getBody ( ) : string
getCurlOption ( $key ) : mixed
getCurlOptions ( ) : array
getHeader ( $key ) : mixed
getHeaders ( ) : array
getHost ( ) : mixed
getMethod ( ) : string
getPath ( ) : mixed
getPostFields ( ) : array
getPostFiles ( ) : array
getQuery ( ) : mixed
getUrl ( ) : string
matches ( Request $request, array $requestMatchers ) : boolean Returns true if specified request matches the current one with specified request matcher callbacks.
removeHeader ( $key )
setAuthorization ( string $username, string $password ) Sets the authorization credentials as header.
setBody ( string $body )
setCurlOption ( $key, $value )
setCurlOptions ( array $curlOptions )
setHeader ( $key, $value )
setMethod ( string $method ) Sets the request method.
setPostField ( $key, $value )
setPostFields ( array $post_fields )
setPostFiles ( array $post_files )
setUrl ( string $url )
toArray ( ) : array Returns an array representation of this request.

메소드 상세

__construct() 공개 메소드

public __construct ( string $method, string $url, array $headers = [] )
$method string
$url string
$headers array

addPostFile() 공개 메소드

public addPostFile ( array $file )
$file array

fromArray() 공개 정적인 메소드

Creates a new Request from a specified array.
public static fromArray ( array $request ) : Request
$request array Request represented as an array.
리턴 Request A new Request from specified array.

getBody() 공개 메소드

public getBody ( ) : string
리턴 string

getCurlOption() 공개 메소드

public getCurlOption ( $key ) : mixed
$key
리턴 mixed

getCurlOptions() 공개 메소드

public getCurlOptions ( ) : array
리턴 array

getHeader() 공개 메소드

public getHeader ( $key ) : mixed
$key
리턴 mixed

getHeaders() 공개 메소드

public getHeaders ( ) : array
리턴 array

getHost() 공개 메소드

public getHost ( ) : mixed
리턴 mixed

getMethod() 공개 메소드

public getMethod ( ) : string
리턴 string

getPath() 공개 메소드

public getPath ( ) : mixed
리턴 mixed

getPostFields() 공개 메소드

public getPostFields ( ) : array
리턴 array

getPostFiles() 공개 메소드

public getPostFiles ( ) : array
리턴 array

getQuery() 공개 메소드

public getQuery ( ) : mixed
리턴 mixed

getUrl() 공개 메소드

public getUrl ( ) : string
리턴 string

matches() 공개 메소드

Returns true if specified request matches the current one with specified request matcher callbacks.
public matches ( Request $request, array $requestMatchers ) : boolean
$request Request Request to check if it matches the current one.
$requestMatchers array Request matcher callbacks.
리턴 boolean True if specified request matches the current one.

removeHeader() 공개 메소드

public removeHeader ( $key )
$key

setAuthorization() 공개 메소드

Sets the authorization credentials as header.
public setAuthorization ( string $username, string $password )
$username string Username.
$password string Password.

setBody() 공개 메소드

public setBody ( string $body )
$body string

setCurlOption() 공개 메소드

public setCurlOption ( $key, $value )
$key
$value

setCurlOptions() 공개 메소드

public setCurlOptions ( array $curlOptions )
$curlOptions array

setHeader() 공개 메소드

public setHeader ( $key, $value )
$key
$value

setMethod() 공개 메소드

Sets the request method.
public setMethod ( string $method )
$method string HTTP request method like GET, POST, PUT, ...

setPostField() 공개 메소드

public setPostField ( $key, $value )
$key
$value

setPostFields() 공개 메소드

public setPostFields ( array $post_fields )
$post_fields array

setPostFiles() 공개 메소드

public setPostFiles ( array $post_files )
$post_files array

setUrl() 공개 메소드

public setUrl ( string $url )
$url string

toArray() 공개 메소드

Returns an array representation of this request.
public toArray ( ) : array
리턴 array Array representation of this request.

프로퍼티 상세

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

protected string $body
리턴 string

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

protected array $curlOptions
리턴 array

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

protected array $headers
리턴 array

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

protected string $method
리턴 string

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

protected array $postFields
리턴 array

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

protected array $postFiles
리턴 array

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

protected string $url
리턴 string