PHP 클래스 Teapot\StatusLine\ResponseStatusLine

PHP version 5.3
저자: Barney Hanlon ([email protected])
상속: implements Teapot\StatusLine
파일 보기 프로젝트 열기: shrikeh/teapot

공개 메소드들

메소드 설명
__construct ( integer $code, string $reason ) Constructor.
isClientError ( ) : boolean Helper to establish if the class of the status code is client error (4xx).
isInformational ( ) : boolean Helper to establish if the class of the status code is informational (1xx).
isRedirection ( ) : boolean Helper to establish if the class of the status code is redirection (3xx).
isServerError ( ) : boolean Helper to establish if the class of the status code is server error (5xx).
isSuccessful ( ) : boolean Helper to establish if the class of the status code is successful (2xx).
reasonPhrase ( ) : string Return the reason phrase
response ( Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface Add the status code and reason phrase to a Response.
statusClass ( ) : integer Return the status class of the response code.
statusCode ( ) : integer Return the response code.

비공개 메소드들

메소드 설명
isStatusClass ( integer $class ) : boolean Test whether the response class matches the class passed to it.
setCode ( integer $code ) Set the code. Used in constructor to ensure the code meets the requirements for a status code.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( integer $code, string $reason )
$code integer The response code
$reason string The reason phrase

isClientError() 공개 메소드

Helper to establish if the class of the status code is client error (4xx).
public isClientError ( ) : boolean
리턴 boolean

isInformational() 공개 메소드

Helper to establish if the class of the status code is informational (1xx).
public isInformational ( ) : boolean
리턴 boolean

isRedirection() 공개 메소드

Helper to establish if the class of the status code is redirection (3xx).
public isRedirection ( ) : boolean
리턴 boolean

isServerError() 공개 메소드

Helper to establish if the class of the status code is server error (5xx).
public isServerError ( ) : boolean
리턴 boolean

isSuccessful() 공개 메소드

Helper to establish if the class of the status code is successful (2xx).
public isSuccessful ( ) : boolean
리턴 boolean

reasonPhrase() 공개 메소드

Return the reason phrase
public reasonPhrase ( ) : string
리턴 string

response() 공개 메소드

Add the status code and reason phrase to a Response.
public response ( Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface
$response Psr\Http\Message\ResponseInterface The response
리턴 Psr\Http\Message\ResponseInterface

statusClass() 공개 메소드

Return the status class of the response code.
public statusClass ( ) : integer
리턴 integer

statusCode() 공개 메소드

Return the response code.
public statusCode ( ) : integer
리턴 integer