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