1<?php
2
3namespace Sabre\DAV\Exception;
4
5use Sabre\DAV;
6
7/**
8 * InvalidSyncToken
9 *
10 * This exception is emited for the {DAV:}valid-sync-token pre-condition, as
11 * 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 the sync-token, supplied by a client is
16 * either completely unknown, or has expired.
17 *
18 * @author Evert Pot (http://evertpot.com/)
19 * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
20 * @license http://sabre.io/license/ Modified BSD License
21 */
22class InvalidSyncToken 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:valid-sync-token');
34        $errorNode->appendChild($error);
35
36    }
37
38}
39