Fully Qualified Name: | Laminas\Http\Header\RetryAfter |
Extends: | AbstractDate |
Retry-After HTTP Header
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 |
Allow casting to string
Returns: string
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
Return date for this header as an instance of \DateTime
Returns: \DateTime
Create Retry-After header from string
Parameter Name | Type | Description |
---|---|---|
$headerLine | string |
Returns: static
Create date-based header from strtotime()-compatible string
Parameter Name | Type | Description |
---|---|---|
$time | int|string |
Returns: static
Create date-based header from Unix timestamp
Parameter Name | Type | Description |
---|---|---|
$time | int |
Returns: static
Return date for this header
Returns: string
Return current date output format
Returns: string
Get number of seconds
Returns: int
Get header name
Returns: string
Returns date if it's set, or number of seconds
Returns: int|string
Set the date for this header, this can be a string or an instance of \DateTime
Parameter Name | Type | Description |
---|---|---|
$date | string|\DateTime |
Returns: $this
Set date output format
Parameter Name | Type | Description |
---|---|---|
$format | int |
Returns:
Set number of seconds
Parameter Name | Type | Description |
---|---|---|
$delta | int |
Returns: $this
Return header line
Returns: string