1<?php
2
3namespace Sabre\DAV\Exception;
4
5use Sabre\DAV;
6
7/**
8 * ReportNotSupported
9 *
10 * This exception is thrown when the client requested an unknown report through the REPORT method
11 *
12 * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
13 * @author Evert Pot (http://evertpot.com/)
14 * @license http://sabre.io/license/ Modified BSD License
15 */
16class ReportNotSupported extends UnsupportedMediaType {
17
18    /**
19     * This method allows the exception to include additional information into the WebDAV error response
20     *
21     * @param DAV\Server $server
22     * @param \DOMElement $errorNode
23     * @return void
24     */
25    function serialize(DAV\Server $server, \DOMElement $errorNode) {
26
27        $error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:supported-report');
28        $errorNode->appendChild($error);
29
30    }
31
32}
33