ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\HTTP\RequestInterface Interface Reference

The RequestInterface represents a HTTP request. More...

+ Inheritance diagram for Sabre\HTTP\RequestInterface:
+ Collaboration diagram for Sabre\HTTP\RequestInterface:

Public Member Functions

 getMethod ()
 Returns the current HTTP method. More...
 
 setMethod ($method)
 Sets the HTTP method. More...
 
 getUrl ()
 Returns the request url. More...
 
 setUrl ($url)
 Sets the request url. More...
 
 getAbsoluteUrl ()
 Returns the absolute url. More...
 
 setAbsoluteUrl ($url)
 Sets the absolute url. More...
 
 getBaseUrl ()
 Returns the current base url. More...
 
 setBaseUrl ($url)
 Sets a base url. More...
 
 getPath ()
 Returns the relative path. More...
 
 getQueryParameters ()
 Returns the list of query parameters. More...
 
 getPostData ()
 Returns the POST data. More...
 
 setPostData (array $postData)
 Sets the post data. More...
 
 getRawServerValue ($valueName)
 Returns an item from the _SERVER array. More...
 
 setRawServerData (array $data)
 Sets the _SERVER array. More...
 
- Public Member Functions inherited from Sabre\HTTP\MessageInterface
 getBodyAsStream ()
 Returns the body as a readable stream resource. More...
 
 getBodyAsString ()
 Returns the body as a string. More...
 
 getBody ()
 Returns the message body, as it's internal representation. More...
 
 setBody ($body)
 Updates the body resource with a new stream. More...
 
 getHeaders ()
 Returns all the HTTP headers as an array. More...
 
 hasHeader ($name)
 Will return true or false, depending on if a HTTP header exists. More...
 
 getHeader ($name)
 Returns a specific HTTP header, based on it's name. More...
 
 getHeaderAsArray ($name)
 Returns a HTTP header as an array. More...
 
 setHeader ($name, $value)
 Updates a HTTP header. More...
 
 setHeaders (array $headers)
 Sets a new set of HTTP headers. More...
 
 addHeader ($name, $value)
 Adds a HTTP header. More...
 
 addHeaders (array $headers)
 Adds a new set of HTTP headers. More...
 
 removeHeader ($name)
 Removes a HTTP header. More...
 
 setHttpVersion ($version)
 Sets the HTTP version. More...
 
 getHttpVersion ()
 Returns the HTTP version. More...
 

Detailed Description

The RequestInterface represents a HTTP request.

Author
Evert Pot (http://evertpot.com/) http://sabre.io/license/ Modified BSD License

Definition at line 12 of file RequestInterface.php.

Member Function Documentation

◆ getAbsoluteUrl()

Sabre\HTTP\RequestInterface::getAbsoluteUrl ( )

Returns the absolute url.

Returns
string

Implemented in Sabre\HTTP\Request, and Sabre\HTTP\RequestDecorator.

Referenced by Sabre\DAV\Mount\Plugin\httpGet().

+ Here is the caller graph for this function:

◆ getBaseUrl()

Sabre\HTTP\RequestInterface::getBaseUrl ( )

Returns the current base url.

Returns
string

Implemented in Sabre\HTTP\Request, and Sabre\HTTP\RequestDecorator.

◆ getMethod()

◆ getPath()

Sabre\HTTP\RequestInterface::getPath ( )

Returns the relative path.

This is being calculated using the base url. This path will not start with a slash, so it will always return something like 'example/path.html'.

If the full path is equal to the base url, this method will return an empty string.

This method will also urldecode the path, and if the url was incoded as ISO-8859-1, it will convert it to UTF-8.

If the path is outside of the base url, a LogicException will be thrown.

Returns
string

Implemented in Sabre\HTTP\Request, and Sabre\HTTP\RequestDecorator.

Referenced by Sabre\DAV\TemporaryFileFilterPlugin\beforeMethod(), Sabre\DAVACL\Plugin\beforeMethod(), Sabre\CalDAV\Schedule\Plugin\calendarObjectChange(), Sabre\DAV\Server\checkPreconditions(), Sabre\DAV\Server\getCopyAndMoveInfo(), Sabre\DAV\Server\getIfConditions(), Sabre\DAVACL\Plugin\httpAcl(), Sabre\DAV\CorePlugin\httpCopy(), Sabre\DAV\CorePlugin\httpDelete(), Sabre\DAV\Browser\MapGetToPropFind\httpGet(), Sabre\CardDAV\VCFExportPlugin\httpGet(), Sabre\DAV\CorePlugin\httpGet(), Sabre\CalDAV\ICSExportPlugin\httpGet(), Sabre\DAV\Browser\Plugin\httpGet(), Sabre\CalDAV\Notifications\Plugin\httpGet(), Sabre\DAV\Locks\Plugin\httpLock(), Sabre\CalDAV\Plugin\httpMkCalendar(), Sabre\DAV\CorePlugin\httpMkcol(), Sabre\DAV\CorePlugin\httpMove(), Sabre\DAV\CorePlugin\httpOptions(), Sabre\DAV\PartialUpdate\Plugin\httpPatch(), Sabre\DAV\Browser\Plugin\httpPOST(), Sabre\CalDAV\Schedule\Plugin\httpPost(), Sabre\DAV\Sharing\Plugin\httpPost(), Sabre\CalDAV\SharingPlugin\httpPost(), Sabre\DAV\TemporaryFileFilterPlugin\httpPropfind(), Sabre\DAV\CorePlugin\httpPropFind(), Sabre\DAV\CorePlugin\httpPropPatch(), Sabre\DAV\CorePlugin\httpPut(), Sabre\DAV\CorePlugin\httpReport(), Sabre\DAV\Locks\Plugin\httpUnlock(), Sabre\CalDAV\Schedule\Plugin\outboxRequest(), and Sabre\DAV\Locks\Plugin\validateTokens().

+ Here is the caller graph for this function:

◆ getPostData()

Sabre\HTTP\RequestInterface::getPostData ( )

Returns the POST data.

This is equivalent to PHP's $_POST superglobal.

Returns
array

Implemented in Sabre\HTTP\Request, and Sabre\HTTP\RequestDecorator.

Referenced by Sabre\DAV\Browser\Plugin\httpPOST().

+ Here is the caller graph for this function:

◆ getQueryParameters()

Sabre\HTTP\RequestInterface::getQueryParameters ( )

Returns the list of query parameters.

This is equivalent to PHP's $_GET superglobal.

Returns
array

Implemented in Sabre\HTTP\RequestDecorator, and Sabre\HTTP\Request.

Referenced by Sabre\DAV\Mount\Plugin\httpGet(), Sabre\CardDAV\VCFExportPlugin\httpGet(), Sabre\CalDAV\ICSExportPlugin\httpGet(), Sabre\DAV\Browser\Plugin\httpGet(), and Sabre\DAV\Browser\Plugin\httpGetEarly().

+ Here is the caller graph for this function:

◆ getRawServerValue()

Sabre\HTTP\RequestInterface::getRawServerValue (   $valueName)

Returns an item from the _SERVER array.

If the value does not exist in the array, null is returned.

Parameters
string$valueName
Returns
string|null

Implemented in Sabre\HTTP\Request, and Sabre\HTTP\RequestDecorator.

Referenced by Sabre\DAV\Auth\Backend\Apache\check().

+ Here is the caller graph for this function:

◆ getUrl()

Sabre\HTTP\RequestInterface::getUrl ( )

◆ setAbsoluteUrl()

Sabre\HTTP\RequestInterface::setAbsoluteUrl (   $url)

Sets the absolute url.

Parameters
string$url
Returns
void

Implemented in Sabre\HTTP\Request, and Sabre\HTTP\RequestDecorator.

◆ setBaseUrl()

Sabre\HTTP\RequestInterface::setBaseUrl (   $url)

Sets a base url.

This url is used for relative path calculations.

The base url should default to /

Parameters
string$url
Returns
void

Implemented in Sabre\HTTP\Request, and Sabre\HTTP\RequestDecorator.

◆ setMethod()

Sabre\HTTP\RequestInterface::setMethod (   $method)

Sets the HTTP method.

Parameters
string$method
Returns
void

Implemented in Sabre\HTTP\Request, and Sabre\HTTP\RequestDecorator.

◆ setPostData()

Sabre\HTTP\RequestInterface::setPostData ( array  $postData)

Sets the post data.

This is equivalent to PHP's $_POST superglobal.

This would not have been needed, if POST data was accessible as php://input, but unfortunately we need to special case it.

Parameters
array$postData
Returns
void

Implemented in Sabre\HTTP\Request, and Sabre\HTTP\RequestDecorator.

◆ setRawServerData()

Sabre\HTTP\RequestInterface::setRawServerData ( array  $data)

Sets the _SERVER array.

Parameters
array$data
Returns
void

Implemented in Sabre\HTTP\Request, and Sabre\HTTP\RequestDecorator.

◆ setUrl()

Sabre\HTTP\RequestInterface::setUrl (   $url)

Sets the request url.

Parameters
string$url
Returns
void

Implemented in Sabre\HTTP\Request, and Sabre\HTTP\RequestDecorator.


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