ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAV\Exception\MethodNotAllowed Class Reference

MethodNotAllowed. More...

+ Inheritance diagram for Sabre\DAV\Exception\MethodNotAllowed:
+ Collaboration diagram for Sabre\DAV\Exception\MethodNotAllowed:

Public Member Functions

 getHTTPCode ()
 Returns the HTTP statuscode for this exception. More...
 
 getHTTPHeaders (\Sabre\DAV\Server $server)
 This method allows the exception to return any extra HTTP response headers. More...
 
- Public Member Functions inherited from Sabre\DAV\Exception
 getHTTPCode ()
 Returns the HTTP statuscode for this exception. More...
 
 serialize (Server $server, \DOMElement $errorNode)
 This method allows the exception to include additional information into the WebDAV error response. More...
 
 getHTTPHeaders (Server $server)
 This method allows the exception to return any extra HTTP response headers. More...
 

Detailed Description

MethodNotAllowed.

The 405 is thrown when a client tried to create a directory on an already existing directory

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

Definition at line 16 of file MethodNotAllowed.php.

Member Function Documentation

◆ getHTTPCode()

Sabre\DAV\Exception\MethodNotAllowed::getHTTPCode ( )

Returns the HTTP statuscode for this exception.

Returns
int

Definition at line 23 of file MethodNotAllowed.php.

23  {
24 
25  return 405;
26 
27  }

◆ getHTTPHeaders()

Sabre\DAV\Exception\MethodNotAllowed::getHTTPHeaders ( \Sabre\DAV\Server  $server)

This method allows the exception to return any extra HTTP response headers.

The headers must be returned as an array.

Parameters
\Sabre\DAV\Server$server
Returns
array

Definition at line 37 of file MethodNotAllowed.php.

37  {
38 
39  $methods = $server->getAllowedMethods($server->getRequestUri());
40 
41  return [
42  'Allow' => strtoupper(implode(', ', $methods)),
43  ];
44 
45  }
$server
Definition: sabredav.php:48

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