Service.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. declare(strict_types=1);
  3. namespace Sabre\DAV\Xml;
  4. /**
  5. * XML service for WebDAV.
  6. *
  7. * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
  8. * @author Evert Pot (http://evertpot.com/)
  9. * @license http://sabre.io/license/ Modified BSD License
  10. */
  11. class Service extends \Sabre\Xml\Service
  12. {
  13. /**
  14. * This is a list of XML elements that we automatically map to PHP classes.
  15. *
  16. * For instance, this list may contain an entry `{DAV:}propfind` that would
  17. * be mapped to Sabre\DAV\Xml\Request\PropFind
  18. */
  19. public $elementMap = [
  20. '{DAV:}multistatus' => 'Sabre\\DAV\\Xml\\Response\\MultiStatus',
  21. '{DAV:}response' => 'Sabre\\DAV\\Xml\\Element\\Response',
  22. // Requests
  23. '{DAV:}propfind' => 'Sabre\\DAV\\Xml\\Request\\PropFind',
  24. '{DAV:}propertyupdate' => 'Sabre\\DAV\\Xml\\Request\\PropPatch',
  25. '{DAV:}mkcol' => 'Sabre\\DAV\\Xml\\Request\\MkCol',
  26. // Properties
  27. '{DAV:}resourcetype' => 'Sabre\\DAV\\Xml\\Property\\ResourceType',
  28. ];
  29. /**
  30. * This is a default list of namespaces.
  31. *
  32. * If you are defining your own custom namespace, add it here to reduce
  33. * bandwidth and improve legibility of xml bodies.
  34. *
  35. * @var array
  36. */
  37. public $namespaceMap = [
  38. 'DAV:' => 'd',
  39. 'http://sabredav.org/ns' => 's',
  40. ];
  41. }