TooManyMatches.php 1013 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. declare(strict_types=1);
  3. namespace Sabre\DAV\Exception;
  4. use Sabre\DAV;
  5. /**
  6. * TooManyMatches.
  7. *
  8. * This exception is emited for the {DAV:}number-of-matches-within-limits
  9. * post-condition, as 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 response to a {DAV:}sync-collection would
  14. * generate more results than the implementation is willing to send back.
  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 TooManyMatches 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:number-of-matches-within-limits');
  28. $errorNode->appendChild($error);
  29. }
  30. }