Class RetryAfter

Summary

Fully Qualified Name: Zend\Http\Header\RetryAfter
Extends: AbstractDate

Description

Retry-After HTTP Header

Methods

Name Description Defined By
__toString() Allow casting to string AbstractDate
compareTo() Compare provided date to date for this header Returns < 0 if date in header is less than $date; > 0 if it's greater, and 0 if they are equal. AbstractDate
date() Return date for this header as an instance of \DateTime AbstractDate
fromString() Create Retry-After header from string RetryAfter
fromTimeString() Create date-based header from strtotime()-compatible string AbstractDate
fromTimestamp() Create date-based header from Unix timestamp AbstractDate
getDate() Return date for this header AbstractDate
getDateFormat() Return current date output format AbstractDate
getDeltaSeconds() Get number of seconds RetryAfter
getFieldName() Get header name RetryAfter
getFieldValue() Returns date if it's set, or number of seconds RetryAfter
setDate() Set the date for this header, this can be a string or an instance of \DateTime AbstractDate
setDateFormat() Set date output format AbstractDate
setDeltaSeconds() Set number of seconds RetryAfter
toString() Return header line RetryAfter

Method Details

__toString()

Allow casting to string

Returns: string

compareTo()

Compare provided date to date for this header Returns < 0 if date in header is less than $date; > 0 if it's greater, and 0 if they are equal.

Parameter Name Type Description
$date string|\DateTime

Returns: int

date()

Return date for this header as an instance of \DateTime

Returns: \DateTime

fromString()

Create Retry-After header from string

Parameter Name Type Description
$headerLine string

Returns: \RetryAfter

fromTimeString()

Create date-based header from strtotime()-compatible string

Parameter Name Type Description
$time int|string

Returns: self

fromTimestamp()

Create date-based header from Unix timestamp

Parameter Name Type Description
$time int

Returns: self

getDate()

Return date for this header

Returns: string

getDateFormat()

Return current date output format

Returns: string

getDeltaSeconds()

Get number of seconds

Returns: int

getFieldName()

Get header name

Returns: string

getFieldValue()

Returns date if it's set, or number of seconds

Returns: int|string

setDate()

Set the date for this header, this can be a string or an instance of \DateTime

Parameter Name Type Description
$date string|\DateTime

Returns: \AbstractDate

setDateFormat()

Set date output format

Parameter Name Type Description
$format int

Returns:

setDeltaSeconds()

Set number of seconds

Parameter Name Type Description
$delta int

Returns: \RetryAfter

toString()

Return header line

Returns: string

Top