InvalidComponentType.php 857 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Sabre\CalDAV\Exception;
  3. use Sabre\DAV;
  4. use Sabre\CalDAV;
  5. /**
  6. * InvalidComponentType
  7. *
  8. * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
  9. * @author Evert Pot (http://evertpot.com/)
  10. * @license http://sabre.io/license/ Modified BSD License
  11. */
  12. class InvalidComponentType extends DAV\Exception\Forbidden {
  13. /**
  14. * Adds in extra information in the xml response.
  15. *
  16. * This method adds the {CALDAV:}supported-calendar-component as defined in rfc4791
  17. *
  18. * @param DAV\Server $server
  19. * @param \DOMElement $errorNode
  20. * @return void
  21. */
  22. function serialize(DAV\Server $server, \DOMElement $errorNode) {
  23. $doc = $errorNode->ownerDocument;
  24. $np = $doc->createElementNS(CalDAV\Plugin::NS_CALDAV, 'cal:supported-calendar-component');
  25. $errorNode->appendChild($np);
  26. }
  27. }