1<?php
2
3namespace Sabre\DAV\Exception;
4
5use Sabre\DAV;
6
7/**
8 * TooManyMatches
9 *
10 * This exception is emited for the {DAV:}number-of-matches-within-limits
11 * post-condition, as defined in rfc6578, section 3.2.
12 *
13 * http://tools.ietf.org/html/rfc6578#section-3.2
14 *
15 * This is emitted in cases where the response to a {DAV:}sync-collection would
16 * generate more results than the implementation is willing to send back.
17 *
18 * @author Evert Pot (http://evertpot.com/)
19 * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
20 * @license http://sabre.io/license/ Modified BSD License
21 */
22class TooManyMatches extends Forbidden {
23
24    /**
25     * This method allows the exception to include additional information into the WebDAV error response
26     *
27     * @param DAV\Server $server
28     * @param \DOMElement $errorNode
29     * @return void
30     */
31    function serialize(DAV\Server $server, \DOMElement $errorNode) {
32
33        $error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:number-of-matches-within-limits');
34        $errorNode->appendChild($error);
35
36    }
37
38}
39