AclRestrictions.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. declare(strict_types=1);
  3. namespace Sabre\DAVACL\Xml\Property;
  4. use Sabre\Xml\Writer;
  5. use Sabre\Xml\XmlSerializable;
  6. /**
  7. * AclRestrictions property.
  8. *
  9. * This property represents {DAV:}acl-restrictions, as defined in RFC3744.
  10. *
  11. * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
  12. * @author Evert Pot (http://evertpot.com/)
  13. * @license http://sabre.io/license/ Modified BSD License
  14. */
  15. class AclRestrictions implements XmlSerializable
  16. {
  17. /**
  18. * The xmlSerialize method is called during xml writing.
  19. *
  20. * Use the $writer argument to write its own xml serialization.
  21. *
  22. * An important note: do _not_ create a parent element. Any element
  23. * implementing XmlSerializable should only ever write what's considered
  24. * its 'inner xml'.
  25. *
  26. * The parent of the current element is responsible for writing a
  27. * containing element.
  28. *
  29. * This allows serializers to be re-used for different element names.
  30. *
  31. * If you are opening new elements, you must also close them again.
  32. */
  33. public function xmlSerialize(Writer $writer)
  34. {
  35. $writer->writeElement('{DAV:}grant-only');
  36. $writer->writeElement('{DAV:}no-invert');
  37. }
  38. }