InvalidSyncToken.php 956 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. declare(strict_types=1);
  3. namespace Sabre\DAV\Exception;
  4. use Sabre\DAV;
  5. /**
  6. * InvalidSyncToken.
  7. *
  8. * This exception is emited for the {DAV:}valid-sync-token pre-condition, as
  9. * defined in rfc6578, section 3.2.
  10. *
  11. * http://tools.ietf.org/html/rfc6578#section-3.2
  12. *
  13. * This is emitted in cases where the the sync-token, supplied by a client is
  14. * either completely unknown, or has expired.
  15. *
  16. * @author Evert Pot (http://evertpot.com/)
  17. * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
  18. * @license http://sabre.io/license/ Modified BSD License
  19. */
  20. class InvalidSyncToken extends Forbidden
  21. {
  22. /**
  23. * This method allows the exception to include additional information into the WebDAV error response.
  24. */
  25. public function serialize(DAV\Server $server, \DOMElement $errorNode)
  26. {
  27. $error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:valid-sync-token');
  28. $errorNode->appendChild($error);
  29. }
  30. }