ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\HTTP\Util Class Reference

HTTP utility methods. More...

+ Collaboration diagram for Sabre\HTTP\Util:

Static Public Member Functions

static negotiateContentType ($acceptHeaderValue, array $availableOptions)
 Content negotiation. More...
 
static negotiate ($acceptHeaderValue, array $availableOptions)
 Deprecated! Use negotiateContentType. More...
 
static parseHTTPDate ($dateHeader)
 Parses a RFC2616-compatible date string. More...
 
static toHTTPDate (\DateTime $dateTime)
 Transforms a DateTime object to HTTP's most common date format. More...
 

Detailed Description

HTTP utility methods.

Author
Evert Pot (http://evertpot.com/)
Paul Voegler
Deprecated:
All these functions moved to functions.php @license http://sabre.io/license/ Modified BSD License

Definition at line 14 of file Util.php.

Member Function Documentation

◆ negotiate()

static Sabre\HTTP\Util::negotiate (   $acceptHeaderValue,
array  $availableOptions 
)
static

Deprecated! Use negotiateContentType.

Deprecated:
Use \Sabre\HTTP\NegotiateContentType
Parameters
string | null$acceptHeaderValue
array$availableOptions
Returns
string|null

Definition at line 38 of file Util.php.

38 {
39
40 return negotiateContentType($acceptHeaderValue, $availableOptions);
41
42 }
static negotiateContentType($acceptHeaderValue, array $availableOptions)
Content negotiation.
Definition: Util.php:24

References Sabre\HTTP\Util\negotiateContentType().

Referenced by Sabre\CalDAV\Plugin\httpAfterGet(), Sabre\CardDAV\Plugin\negotiateVCard(), and Sabre\HTTP\UtilTest\testNegotiate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ negotiateContentType()

static Sabre\HTTP\Util::negotiateContentType (   $acceptHeaderValue,
array  $availableOptions 
)
static

Content negotiation.

Deprecated:
Use \Sabre\HTTP\negotiateContentType
Parameters
string | null$acceptHeaderValue
array$availableOptions
Returns
string|null

Definition at line 24 of file Util.php.

24 {
25
26 return negotiateContentType($acceptHeaderValue, $availableOptions);
27
28 }

References Sabre\HTTP\Util\negotiateContentType().

Referenced by Sabre\HTTP\Util\negotiate(), and Sabre\HTTP\Util\negotiateContentType().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseHTTPDate()

static Sabre\HTTP\Util::parseHTTPDate (   $dateHeader)
static

Parses a RFC2616-compatible date string.

This method returns false if the date is invalid

Deprecated:
Use parseDate
Parameters
string$dateHeader
Returns
bool|DateTime

Definition at line 53 of file Util.php.

53 {
54
55 return parseDate($dateHeader);
56
57 }
parseDate($dateString)
A collection of useful helpers for parsing or generating various HTTP headers.
Definition: functions.php:32

References Sabre\HTTP\parseDate().

Referenced by Sabre\DAV\Server\checkPreconditions(), Sabre\HTTP\UtilTest\testParseHTTPDate(), Sabre\HTTP\UtilTest\testParseHTTPDateFail(), and Sabre\HTTP\Auth\AWS\validateRFC2616Date().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toHTTPDate()

static Sabre\HTTP\Util::toHTTPDate ( \DateTime  $dateTime)
static

Transforms a DateTime object to HTTP's most common date format.

We're serializing it as the RFC 1123 date, which, for HTTP must be specified as GMT.

Deprecated:
Use toDate
Parameters
\DateTime$dateTime
Returns
string

Definition at line 69 of file Util.php.

69 {
70
71 return toDate($dateTime);
72
73 }
toDate(DateTime $dateTime)
Transforms a DateTime object to a valid HTTP/1.1 Date header value.
Definition: functions.php:77

References Sabre\HTTP\toDate().

Referenced by Sabre\DAV\Server\checkPreconditions(), Sabre\DAV\Server\getHTTPHeaders(), Sabre\DAV\ServerRangeTest\setUp(), Sabre\DAV\ServerSimpleTest\testBaseUri(), Sabre\DAV\FSExt\ServerTest\testGet(), Sabre\DAV\FSExt\ServerTest\testHEAD(), Sabre\HTTP\UtilTest\testToHTTPDate(), and Sabre\DAV\Xml\Property\GetLastModified\xmlSerialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: