PHP 클래스 Horde_Http_Request_Mock, horde

저자: Chuck Hagenbuch ([email protected])
저자: Gunnar Wrobel ([email protected])
상속: extends Horde_Http_Request_Base
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_responses array Mock responses to return.

공개 메소드들

메소드 설명
addResponse ( string | resourse $body, string $code = 200, string $uri = '', array $headers = [] ) : Horde_Http_Response_Mock Adds a response to the stack of responses.
addResponses ( array $responses ) : null Set the HTTP response(s) to be returned by this adapter as an array of strings.
send ( ) : Horde_Http_Response_Mock | null Send this HTTP request
setResponse ( Horde_Http_Response_Base $response ) Set the HTTP response(s) to be returned by this adapter. This overwrites any responses set before.

메소드 상세

addResponse() 공개 메소드

Adds a response to the stack of responses.
public addResponse ( string | resourse $body, string $code = 200, string $uri = '', array $headers = [] ) : Horde_Http_Response_Mock
$body string | resourse The response body content.
$code string The response code.
$uri string The request uri.
$headers array Response headers. This can be one string representing the whole header or an array of strings with one string per header line.
리턴 Horde_Http_Response_Mock The response.

addResponses() 공개 메소드

Set the HTTP response(s) to be returned by this adapter as an array of strings.
public addResponses ( array $responses ) : null
$responses array The responses to be added to the stack.
리턴 null

send() 공개 메소드

Send this HTTP request
public send ( ) : Horde_Http_Response_Mock | null
리턴 Horde_Http_Response_Mock | null A response object or NULL in case no responses has been set.

setResponse() 공개 메소드

Set the HTTP response(s) to be returned by this adapter. This overwrites any responses set before.
public setResponse ( Horde_Http_Response_Base $response )
$response Horde_Http_Response_Base

프로퍼티 상세

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

Mock responses to return.
protected array $_responses
리턴 array