]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/lib/Sabre/DAV/Exception.php
privacy_image_cache: checking if the cached file really is an image
[friendica-addons.git] / dav / SabreDAV / lib / Sabre / DAV / Exception.php
1 <?php
2
3 /**
4  * SabreDAV base exception
5  *
6  * This is SabreDAV's base exception file, use this to implement your own exception.
7  *
8  * @package Sabre
9  * @subpackage DAV
10  * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
11  * @author Evert Pot (http://www.rooftopsolutions.nl/) 
12  * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
13  */
14
15 /**
16  * Main Exception class.
17  *
18  * This class defines a getHTTPCode method, which should return the appropriate HTTP code for the Exception occurred.
19  * The default for this is 500.
20  *
21  * This class also allows you to generate custom xml data for your exceptions. This will be displayed
22  * in the 'error' element in the failing response.
23  */
24 class Sabre_DAV_Exception extends Exception {
25
26     /**
27      * Returns the HTTP statuscode for this exception
28      *
29      * @return int
30      */
31     public function getHTTPCode() {
32
33         return 500;
34
35     }
36
37     /**
38      * This method allows the exception to include additional information into the WebDAV error response
39      *
40      * @param Sabre_DAV_Server $server
41      * @param DOMElement $errorNode
42      * @return void
43      */
44     public function serialize(Sabre_DAV_Server $server,DOMElement $errorNode) {
45
46
47     }
48
49     /**
50      * This method allows the exception to return any extra HTTP response headers.
51      *
52      * The headers must be returned as an array.
53      *
54      * @param Sabre_DAV_Server $server
55      * @return array
56      */
57     public function getHTTPHeaders(Sabre_DAV_Server $server) {
58
59         return array();
60
61     }
62
63 }
64