PHP 클래스 Lukasoppermann\Httpstatus\Httpstatus

상속: implements Countabl\Countable, implements IteratorAggregat\IteratorAggregate
파일 보기 프로젝트 열기: lukasoppermann/http-status 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$httpStatus

공개 메소드들

메소드 설명
__construct ( Traversable | array $statusArray = [] ) Create a new Httpstatus Instance.
count ( )
getIterator ( )
getReasonPhrase ( string $statusCode ) : string Get the text for a given status code.
getResponseClass ( integer $statusCode ) : integer Determines the response class of a response code.
getStatusCode ( string $statusText ) : string Get the code for a given status text.
hasReasonPhrase ( integer $statusText ) : boolean Check if the hasReasonPhrase exists in a collection.
hasStatusCode ( integer $statusCode ) : boolean Check if the code exists in a collection.
mergeHttpStatus ( integer $code, string $text ) Add or Update the HTTP Status array.

보호된 메소드들

메소드 설명
fetchStatusCode ( string $text ) : mixed Fetch the status code for a given reason phrase.
filterCollection ( Traversable | array $collection ) : Traversable | array Filter a Collection array.
filterReasonPhrase ( string $text ) : string Filter a Reason Phrase.
filterStatusCode ( integer $code ) : integer Filter a HTTP Status code.

메소드 상세

__construct() 공개 메소드

Create a new Httpstatus Instance.
public __construct ( Traversable | array $statusArray = [] )
$statusArray Traversable | array a collection of HTTP status code and their associated reason phrase

count() 공개 메소드

public count ( )

fetchStatusCode() 보호된 메소드

Fetch the status code for a given reason phrase.
protected fetchStatusCode ( string $text ) : mixed
$text string the reason phrase
리턴 mixed

filterCollection() 보호된 메소드

Filter a Collection array.
protected filterCollection ( Traversable | array $collection ) : Traversable | array
$collection Traversable | array
리턴 Traversable | array

filterReasonPhrase() 보호된 메소드

Filter a Reason Phrase.
또한 보기: http://tools.ietf.org/html/rfc2616#section-6.1.1
protected filterReasonPhrase ( string $text ) : string
$text string
리턴 string

filterStatusCode() 보호된 메소드

Filter a HTTP Status code.
protected filterStatusCode ( integer $code ) : integer
$code integer
리턴 integer

getIterator() 공개 메소드

public getIterator ( )

getReasonPhrase() 공개 메소드

Get the text for a given status code.
public getReasonPhrase ( string $statusCode ) : string
$statusCode string http status code
리턴 string Returns text for the given status code

getResponseClass() 공개 메소드

See the CLASS_ constants for possible return values
public getResponseClass ( integer $statusCode ) : integer
$statusCode integer
리턴 integer

getStatusCode() 공개 메소드

Get the code for a given status text.
public getStatusCode ( string $statusText ) : string
$statusText string http status text
리턴 string Returns code for the given status text

hasReasonPhrase() 공개 메소드

Check if the hasReasonPhrase exists in a collection.
public hasReasonPhrase ( integer $statusText ) : boolean
$statusText integer http status text
리턴 boolean true|false

hasStatusCode() 공개 메소드

Check if the code exists in a collection.
public hasStatusCode ( integer $statusCode ) : boolean
$statusCode integer http status code
리턴 boolean true|false

mergeHttpStatus() 공개 메소드

Add or Update the HTTP Status array.
public mergeHttpStatus ( integer $code, string $text )
$code integer a HTTP status Code
$text string a associated reason phrase

프로퍼티 상세

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

protected $httpStatus