Methods
Allow casting to string
__toString() : string
Inherited
inherited_from |
\Zend\Http\Header\AbstractDate::__toString() |
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.
compareTo(string | \DateTime $date) : int
Inherited
see |
\strcmp() |
inherited_from |
\Zend\Http\Header\AbstractDate::compareTo() |
Parameters
Exceptions
Returns
int
Return date for this header as an instance of \DateTime
date() : \DateTime
Inherited
inherited_from |
\Zend\Http\Header\AbstractDate::date() |
Returns
Create Retry-After header from string
fromString(string $headerLine) : \Zend\Http\Header\RetryAfter
Parameters
$headerLine
string
Exceptions
Returns
Create date-based header from strtotime()-compatible string
fromTimeString(int | string $time) : \Zend\Http\Header\self
Inherited
inherited_from |
\Zend\Http\Header\AbstractDate::fromTimeString() |
Parameters
$time
intstring
Exceptions
Returns
\Zend\Http\Header\self
Create date-based header from Unix timestamp
fromTimestamp(int $time) : \Zend\Http\Header\self
Inherited
inherited_from |
\Zend\Http\Header\AbstractDate::fromTimestamp() |
Parameters
$time
int
Exceptions
Returns
\Zend\Http\Header\self
Return date for this header
getDate() : string
Inherited
inherited_from |
\Zend\Http\Header\AbstractDate::getDate() |
Returns
string
Get number of seconds
getDeltaSeconds() : int
Get header name
getFieldName() : string
Returns date if it's set, or number of seconds
getFieldValue() : int | string
Set the date for this header, this can be a string or an instance of \DateTime
setDate(string | \DateTime $date) : \Zend\Http\Header\AbstractDate
Inherited
inherited_from |
\Zend\Http\Header\AbstractDate::setDate() |
Parameters
Exceptions
Returns
Return header line
toString() : string
Returns in form of "NAME: VALUE"
Returns
string
Properties
Date instance for this header
$date : \DateTime
Inherited
inherited_from |
\Zend\Http\Header\AbstractDate::$$date |
Value of header in delta-seconds
By default set to 1 hour
$deltaSeconds : int
Constants
DATE_ANSIC
DATE_ANSIC
Inherited
inherited_from |
\Zend\Http\Header\AbstractDate::DATE_ANSIC |
DATE_RFC1036
DATE_RFC1036
Inherited
inherited_from |
\Zend\Http\Header\AbstractDate::DATE_RFC1036 |
Date formats according to RFC 2616
DATE_RFC1123
Inherited