Class IfModifiedSince

Summary

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

Description

If-Modified-Since 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 date-based header from string AbstractDate
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
getFieldName() Get header name IfModifiedSince
getFieldValue() Get header value as formatted date AbstractDate
setDate() Set the date for this header, this can be a string or an instance of \DateTime AbstractDate
setDateFormat() Set date output format AbstractDate
toString() Return header line AbstractDate

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 date-based header from string

Parameter Name Type Description
$headerLine string

Returns: \AbstractDate

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

getFieldName()

Get header name

Returns: string

getFieldValue()

Get header value as formatted date

Returns: 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:

toString()

Return header line

Returns: string

Top