@@ -26,110 +26,110 @@ |
||
26 | 26 | */ |
27 | 27 | class ShareAccess implements Element |
28 | 28 | { |
29 | - /** |
|
30 | - * Either SHARED or SHAREDOWNER. |
|
31 | - * |
|
32 | - * @var int |
|
33 | - */ |
|
34 | - protected $value; |
|
29 | + /** |
|
30 | + * Either SHARED or SHAREDOWNER. |
|
31 | + * |
|
32 | + * @var int |
|
33 | + */ |
|
34 | + protected $value; |
|
35 | 35 | |
36 | - /** |
|
37 | - * Creates the property. |
|
38 | - * |
|
39 | - * The constructor value must be one of the |
|
40 | - * \Sabre\DAV\Sharing\Plugin::ACCESS_ constants. |
|
41 | - * |
|
42 | - * @param int $shareAccess |
|
43 | - */ |
|
44 | - public function __construct($shareAccess) |
|
45 | - { |
|
46 | - $this->value = $shareAccess; |
|
47 | - } |
|
36 | + /** |
|
37 | + * Creates the property. |
|
38 | + * |
|
39 | + * The constructor value must be one of the |
|
40 | + * \Sabre\DAV\Sharing\Plugin::ACCESS_ constants. |
|
41 | + * |
|
42 | + * @param int $shareAccess |
|
43 | + */ |
|
44 | + public function __construct($shareAccess) |
|
45 | + { |
|
46 | + $this->value = $shareAccess; |
|
47 | + } |
|
48 | 48 | |
49 | - /** |
|
50 | - * Returns the current value. |
|
51 | - * |
|
52 | - * @return int |
|
53 | - */ |
|
54 | - public function getValue() |
|
55 | - { |
|
56 | - return $this->value; |
|
57 | - } |
|
49 | + /** |
|
50 | + * Returns the current value. |
|
51 | + * |
|
52 | + * @return int |
|
53 | + */ |
|
54 | + public function getValue() |
|
55 | + { |
|
56 | + return $this->value; |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * The xmlSerialize method is called during xml writing. |
|
61 | - * |
|
62 | - * Use the $writer argument to write its own xml serialization. |
|
63 | - * |
|
64 | - * An important note: do _not_ create a parent element. Any element |
|
65 | - * implementing XmlSerializable should only ever write what's considered |
|
66 | - * its 'inner xml'. |
|
67 | - * |
|
68 | - * The parent of the current element is responsible for writing a |
|
69 | - * containing element. |
|
70 | - * |
|
71 | - * This allows serializers to be re-used for different element names. |
|
72 | - * |
|
73 | - * If you are opening new elements, you must also close them again. |
|
74 | - */ |
|
75 | - public function xmlSerialize(Writer $writer) |
|
76 | - { |
|
77 | - switch ($this->value) { |
|
78 | - case SharingPlugin::ACCESS_NOTSHARED: |
|
79 | - $writer->writeElement('{DAV:}not-shared'); |
|
80 | - break; |
|
81 | - case SharingPlugin::ACCESS_SHAREDOWNER: |
|
82 | - $writer->writeElement('{DAV:}shared-owner'); |
|
83 | - break; |
|
84 | - case SharingPlugin::ACCESS_READ: |
|
85 | - $writer->writeElement('{DAV:}read'); |
|
86 | - break; |
|
87 | - case SharingPlugin::ACCESS_READWRITE: |
|
88 | - $writer->writeElement('{DAV:}read-write'); |
|
89 | - break; |
|
90 | - case SharingPlugin::ACCESS_NOACCESS: |
|
91 | - $writer->writeElement('{DAV:}no-access'); |
|
92 | - break; |
|
93 | - } |
|
94 | - } |
|
59 | + /** |
|
60 | + * The xmlSerialize method is called during xml writing. |
|
61 | + * |
|
62 | + * Use the $writer argument to write its own xml serialization. |
|
63 | + * |
|
64 | + * An important note: do _not_ create a parent element. Any element |
|
65 | + * implementing XmlSerializable should only ever write what's considered |
|
66 | + * its 'inner xml'. |
|
67 | + * |
|
68 | + * The parent of the current element is responsible for writing a |
|
69 | + * containing element. |
|
70 | + * |
|
71 | + * This allows serializers to be re-used for different element names. |
|
72 | + * |
|
73 | + * If you are opening new elements, you must also close them again. |
|
74 | + */ |
|
75 | + public function xmlSerialize(Writer $writer) |
|
76 | + { |
|
77 | + switch ($this->value) { |
|
78 | + case SharingPlugin::ACCESS_NOTSHARED: |
|
79 | + $writer->writeElement('{DAV:}not-shared'); |
|
80 | + break; |
|
81 | + case SharingPlugin::ACCESS_SHAREDOWNER: |
|
82 | + $writer->writeElement('{DAV:}shared-owner'); |
|
83 | + break; |
|
84 | + case SharingPlugin::ACCESS_READ: |
|
85 | + $writer->writeElement('{DAV:}read'); |
|
86 | + break; |
|
87 | + case SharingPlugin::ACCESS_READWRITE: |
|
88 | + $writer->writeElement('{DAV:}read-write'); |
|
89 | + break; |
|
90 | + case SharingPlugin::ACCESS_NOACCESS: |
|
91 | + $writer->writeElement('{DAV:}no-access'); |
|
92 | + break; |
|
93 | + } |
|
94 | + } |
|
95 | 95 | |
96 | - /** |
|
97 | - * The deserialize method is called during xml parsing. |
|
98 | - * |
|
99 | - * This method is called statically, this is because in theory this method |
|
100 | - * may be used as a type of constructor, or factory method. |
|
101 | - * |
|
102 | - * Often you want to return an instance of the current class, but you are |
|
103 | - * free to return other data as well. |
|
104 | - * |
|
105 | - * You are responsible for advancing the reader to the next element. Not |
|
106 | - * doing anything will result in a never-ending loop. |
|
107 | - * |
|
108 | - * If you just want to skip parsing for this element altogether, you can |
|
109 | - * just call $reader->next(); |
|
110 | - * |
|
111 | - * $reader->parseInnerTree() will parse the entire sub-tree, and advance to |
|
112 | - * the next element. |
|
113 | - * |
|
114 | - * @return mixed |
|
115 | - */ |
|
116 | - public static function xmlDeserialize(Reader $reader) |
|
117 | - { |
|
118 | - $elems = $reader->parseInnerTree(); |
|
119 | - foreach ($elems as $elem) { |
|
120 | - switch ($elem['name']) { |
|
121 | - case '{DAV:}not-shared': |
|
122 | - return new self(SharingPlugin::ACCESS_NOTSHARED); |
|
123 | - case '{DAV:}shared-owner': |
|
124 | - return new self(SharingPlugin::ACCESS_SHAREDOWNER); |
|
125 | - case '{DAV:}read': |
|
126 | - return new self(SharingPlugin::ACCESS_READ); |
|
127 | - case '{DAV:}read-write': |
|
128 | - return new self(SharingPlugin::ACCESS_READWRITE); |
|
129 | - case '{DAV:}no-access': |
|
130 | - return new self(SharingPlugin::ACCESS_NOACCESS); |
|
131 | - } |
|
132 | - } |
|
133 | - throw new BadRequest('Invalid value for {DAV:}share-access element'); |
|
134 | - } |
|
96 | + /** |
|
97 | + * The deserialize method is called during xml parsing. |
|
98 | + * |
|
99 | + * This method is called statically, this is because in theory this method |
|
100 | + * may be used as a type of constructor, or factory method. |
|
101 | + * |
|
102 | + * Often you want to return an instance of the current class, but you are |
|
103 | + * free to return other data as well. |
|
104 | + * |
|
105 | + * You are responsible for advancing the reader to the next element. Not |
|
106 | + * doing anything will result in a never-ending loop. |
|
107 | + * |
|
108 | + * If you just want to skip parsing for this element altogether, you can |
|
109 | + * just call $reader->next(); |
|
110 | + * |
|
111 | + * $reader->parseInnerTree() will parse the entire sub-tree, and advance to |
|
112 | + * the next element. |
|
113 | + * |
|
114 | + * @return mixed |
|
115 | + */ |
|
116 | + public static function xmlDeserialize(Reader $reader) |
|
117 | + { |
|
118 | + $elems = $reader->parseInnerTree(); |
|
119 | + foreach ($elems as $elem) { |
|
120 | + switch ($elem['name']) { |
|
121 | + case '{DAV:}not-shared': |
|
122 | + return new self(SharingPlugin::ACCESS_NOTSHARED); |
|
123 | + case '{DAV:}shared-owner': |
|
124 | + return new self(SharingPlugin::ACCESS_SHAREDOWNER); |
|
125 | + case '{DAV:}read': |
|
126 | + return new self(SharingPlugin::ACCESS_READ); |
|
127 | + case '{DAV:}read-write': |
|
128 | + return new self(SharingPlugin::ACCESS_READWRITE); |
|
129 | + case '{DAV:}no-access': |
|
130 | + return new self(SharingPlugin::ACCESS_NOACCESS); |
|
131 | + } |
|
132 | + } |
|
133 | + throw new BadRequest('Invalid value for {DAV:}share-access element'); |
|
134 | + } |
|
135 | 135 | } |
@@ -26,23 +26,23 @@ |
||
26 | 26 | */ |
27 | 27 | class LocalHref extends Href |
28 | 28 | { |
29 | - /** |
|
30 | - * Constructor. |
|
31 | - * |
|
32 | - * You must either pass a string for a single href, or an array of hrefs. |
|
33 | - * |
|
34 | - * If auto-prefix is set to false, the hrefs will be treated as absolute |
|
35 | - * and not relative to the servers base uri. |
|
36 | - * |
|
37 | - * @param string|string[] $hrefs |
|
38 | - */ |
|
39 | - public function __construct($hrefs) |
|
40 | - { |
|
41 | - parent::__construct(array_map( |
|
42 | - function ($href) { |
|
43 | - return \Sabre\HTTP\encodePath($href); |
|
44 | - }, |
|
45 | - (array) $hrefs |
|
46 | - )); |
|
47 | - } |
|
29 | + /** |
|
30 | + * Constructor. |
|
31 | + * |
|
32 | + * You must either pass a string for a single href, or an array of hrefs. |
|
33 | + * |
|
34 | + * If auto-prefix is set to false, the hrefs will be treated as absolute |
|
35 | + * and not relative to the servers base uri. |
|
36 | + * |
|
37 | + * @param string|string[] $hrefs |
|
38 | + */ |
|
39 | + public function __construct($hrefs) |
|
40 | + { |
|
41 | + parent::__construct(array_map( |
|
42 | + function ($href) { |
|
43 | + return \Sabre\HTTP\encodePath($href); |
|
44 | + }, |
|
45 | + (array) $hrefs |
|
46 | + )); |
|
47 | + } |
|
48 | 48 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | public function __construct($hrefs) |
40 | 40 | { |
41 | 41 | parent::__construct(array_map( |
42 | - function ($href) { |
|
42 | + function($href) { |
|
43 | 43 | return \Sabre\HTTP\encodePath($href); |
44 | 44 | }, |
45 | 45 | (array) $hrefs |
@@ -24,82 +24,82 @@ |
||
24 | 24 | */ |
25 | 25 | class LockDiscovery implements XmlSerializable |
26 | 26 | { |
27 | - /** |
|
28 | - * locks. |
|
29 | - * |
|
30 | - * @var LockInfo[] |
|
31 | - */ |
|
32 | - public $locks; |
|
27 | + /** |
|
28 | + * locks. |
|
29 | + * |
|
30 | + * @var LockInfo[] |
|
31 | + */ |
|
32 | + public $locks; |
|
33 | 33 | |
34 | - /** |
|
35 | - * Hides the {DAV:}lockroot element from the response. |
|
36 | - * |
|
37 | - * It was reported that showing the lockroot in the response can break |
|
38 | - * Office 2000 compatibility. |
|
39 | - * |
|
40 | - * @var bool |
|
41 | - */ |
|
42 | - public static $hideLockRoot = false; |
|
34 | + /** |
|
35 | + * Hides the {DAV:}lockroot element from the response. |
|
36 | + * |
|
37 | + * It was reported that showing the lockroot in the response can break |
|
38 | + * Office 2000 compatibility. |
|
39 | + * |
|
40 | + * @var bool |
|
41 | + */ |
|
42 | + public static $hideLockRoot = false; |
|
43 | 43 | |
44 | - /** |
|
45 | - * __construct. |
|
46 | - * |
|
47 | - * @param LockInfo[] $locks |
|
48 | - */ |
|
49 | - public function __construct($locks) |
|
50 | - { |
|
51 | - $this->locks = $locks; |
|
52 | - } |
|
44 | + /** |
|
45 | + * __construct. |
|
46 | + * |
|
47 | + * @param LockInfo[] $locks |
|
48 | + */ |
|
49 | + public function __construct($locks) |
|
50 | + { |
|
51 | + $this->locks = $locks; |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * The serialize method is called during xml writing. |
|
56 | - * |
|
57 | - * It should use the $writer argument to encode this object into XML. |
|
58 | - * |
|
59 | - * Important note: it is not needed to create the parent element. The |
|
60 | - * parent element is already created, and we only have to worry about |
|
61 | - * attributes, child elements and text (if any). |
|
62 | - * |
|
63 | - * Important note 2: If you are writing any new elements, you are also |
|
64 | - * responsible for closing them. |
|
65 | - */ |
|
66 | - public function xmlSerialize(Writer $writer) |
|
67 | - { |
|
68 | - foreach ($this->locks as $lock) { |
|
69 | - $writer->startElement('{DAV:}activelock'); |
|
54 | + /** |
|
55 | + * The serialize method is called during xml writing. |
|
56 | + * |
|
57 | + * It should use the $writer argument to encode this object into XML. |
|
58 | + * |
|
59 | + * Important note: it is not needed to create the parent element. The |
|
60 | + * parent element is already created, and we only have to worry about |
|
61 | + * attributes, child elements and text (if any). |
|
62 | + * |
|
63 | + * Important note 2: If you are writing any new elements, you are also |
|
64 | + * responsible for closing them. |
|
65 | + */ |
|
66 | + public function xmlSerialize(Writer $writer) |
|
67 | + { |
|
68 | + foreach ($this->locks as $lock) { |
|
69 | + $writer->startElement('{DAV:}activelock'); |
|
70 | 70 | |
71 | - $writer->startElement('{DAV:}lockscope'); |
|
72 | - if (LockInfo::SHARED === $lock->scope) { |
|
73 | - $writer->writeElement('{DAV:}shared'); |
|
74 | - } else { |
|
75 | - $writer->writeElement('{DAV:}exclusive'); |
|
76 | - } |
|
71 | + $writer->startElement('{DAV:}lockscope'); |
|
72 | + if (LockInfo::SHARED === $lock->scope) { |
|
73 | + $writer->writeElement('{DAV:}shared'); |
|
74 | + } else { |
|
75 | + $writer->writeElement('{DAV:}exclusive'); |
|
76 | + } |
|
77 | 77 | |
78 | - $writer->endElement(); // {DAV:}lockscope |
|
78 | + $writer->endElement(); // {DAV:}lockscope |
|
79 | 79 | |
80 | - $writer->startElement('{DAV:}locktype'); |
|
81 | - $writer->writeElement('{DAV:}write'); |
|
82 | - $writer->endElement(); // {DAV:}locktype |
|
80 | + $writer->startElement('{DAV:}locktype'); |
|
81 | + $writer->writeElement('{DAV:}write'); |
|
82 | + $writer->endElement(); // {DAV:}locktype |
|
83 | 83 | |
84 | - if (!self::$hideLockRoot) { |
|
85 | - $writer->startElement('{DAV:}lockroot'); |
|
86 | - $writer->writeElement('{DAV:}href', $writer->contextUri.$lock->uri); |
|
87 | - $writer->endElement(); // {DAV:}lockroot |
|
88 | - } |
|
89 | - $writer->writeElement('{DAV:}depth', (DAV\Server::DEPTH_INFINITY == $lock->depth ? 'infinity' : $lock->depth)); |
|
90 | - $writer->writeElement('{DAV:}timeout', (LockInfo::TIMEOUT_INFINITE === $lock->timeout ? 'Infinite' : 'Second-'.$lock->timeout)); |
|
84 | + if (!self::$hideLockRoot) { |
|
85 | + $writer->startElement('{DAV:}lockroot'); |
|
86 | + $writer->writeElement('{DAV:}href', $writer->contextUri.$lock->uri); |
|
87 | + $writer->endElement(); // {DAV:}lockroot |
|
88 | + } |
|
89 | + $writer->writeElement('{DAV:}depth', (DAV\Server::DEPTH_INFINITY == $lock->depth ? 'infinity' : $lock->depth)); |
|
90 | + $writer->writeElement('{DAV:}timeout', (LockInfo::TIMEOUT_INFINITE === $lock->timeout ? 'Infinite' : 'Second-'.$lock->timeout)); |
|
91 | 91 | |
92 | - // optional according to https://tools.ietf.org/html/rfc4918#section-6.5 |
|
93 | - if (null !== $lock->token && '' !== $lock->token) { |
|
94 | - $writer->startElement('{DAV:}locktoken'); |
|
95 | - $writer->writeElement('{DAV:}href', 'opaquelocktoken:'.$lock->token); |
|
96 | - $writer->endElement(); // {DAV:}locktoken |
|
97 | - } |
|
92 | + // optional according to https://tools.ietf.org/html/rfc4918#section-6.5 |
|
93 | + if (null !== $lock->token && '' !== $lock->token) { |
|
94 | + $writer->startElement('{DAV:}locktoken'); |
|
95 | + $writer->writeElement('{DAV:}href', 'opaquelocktoken:'.$lock->token); |
|
96 | + $writer->endElement(); // {DAV:}locktoken |
|
97 | + } |
|
98 | 98 | |
99 | - if ($lock->owner) { |
|
100 | - $writer->writeElement('{DAV:}owner', new XmlFragment($lock->owner)); |
|
101 | - } |
|
102 | - $writer->endElement(); // {DAV:}activelock |
|
103 | - } |
|
104 | - } |
|
99 | + if ($lock->owner) { |
|
100 | + $writer->writeElement('{DAV:}owner', new XmlFragment($lock->owner)); |
|
101 | + } |
|
102 | + $writer->endElement(); // {DAV:}activelock |
|
103 | + } |
|
104 | + } |
|
105 | 105 | } |
@@ -24,91 +24,91 @@ |
||
24 | 24 | */ |
25 | 25 | class SupportedMethodSet implements XmlSerializable, HtmlOutput |
26 | 26 | { |
27 | - /** |
|
28 | - * List of methods. |
|
29 | - * |
|
30 | - * @var string[] |
|
31 | - */ |
|
32 | - protected $methods = []; |
|
27 | + /** |
|
28 | + * List of methods. |
|
29 | + * |
|
30 | + * @var string[] |
|
31 | + */ |
|
32 | + protected $methods = []; |
|
33 | 33 | |
34 | - /** |
|
35 | - * Creates the property. |
|
36 | - * |
|
37 | - * @param string[] $methods |
|
38 | - */ |
|
39 | - public function __construct(array $methods) |
|
40 | - { |
|
41 | - $this->methods = $methods; |
|
42 | - } |
|
34 | + /** |
|
35 | + * Creates the property. |
|
36 | + * |
|
37 | + * @param string[] $methods |
|
38 | + */ |
|
39 | + public function __construct(array $methods) |
|
40 | + { |
|
41 | + $this->methods = $methods; |
|
42 | + } |
|
43 | 43 | |
44 | - /** |
|
45 | - * Returns the list of supported http methods. |
|
46 | - * |
|
47 | - * @return string[] |
|
48 | - */ |
|
49 | - public function getValue() |
|
50 | - { |
|
51 | - return $this->methods; |
|
52 | - } |
|
44 | + /** |
|
45 | + * Returns the list of supported http methods. |
|
46 | + * |
|
47 | + * @return string[] |
|
48 | + */ |
|
49 | + public function getValue() |
|
50 | + { |
|
51 | + return $this->methods; |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * Returns true or false if the property contains a specific method. |
|
56 | - * |
|
57 | - * @param string $methodName |
|
58 | - * |
|
59 | - * @return bool |
|
60 | - */ |
|
61 | - public function has($methodName) |
|
62 | - { |
|
63 | - return in_array( |
|
64 | - $methodName, |
|
65 | - $this->methods |
|
66 | - ); |
|
67 | - } |
|
54 | + /** |
|
55 | + * Returns true or false if the property contains a specific method. |
|
56 | + * |
|
57 | + * @param string $methodName |
|
58 | + * |
|
59 | + * @return bool |
|
60 | + */ |
|
61 | + public function has($methodName) |
|
62 | + { |
|
63 | + return in_array( |
|
64 | + $methodName, |
|
65 | + $this->methods |
|
66 | + ); |
|
67 | + } |
|
68 | 68 | |
69 | - /** |
|
70 | - * The xmlSerialize method is called during xml writing. |
|
71 | - * |
|
72 | - * Use the $writer argument to write its own xml serialization. |
|
73 | - * |
|
74 | - * An important note: do _not_ create a parent element. Any element |
|
75 | - * implementing XmlSerializable should only ever write what's considered |
|
76 | - * its 'inner xml'. |
|
77 | - * |
|
78 | - * The parent of the current element is responsible for writing a |
|
79 | - * containing element. |
|
80 | - * |
|
81 | - * This allows serializers to be re-used for different element names. |
|
82 | - * |
|
83 | - * If you are opening new elements, you must also close them again. |
|
84 | - */ |
|
85 | - public function xmlSerialize(Writer $writer) |
|
86 | - { |
|
87 | - foreach ($this->getValue() as $val) { |
|
88 | - $writer->startElement('{DAV:}supported-method'); |
|
89 | - $writer->writeAttribute('name', $val); |
|
90 | - $writer->endElement(); |
|
91 | - } |
|
92 | - } |
|
69 | + /** |
|
70 | + * The xmlSerialize method is called during xml writing. |
|
71 | + * |
|
72 | + * Use the $writer argument to write its own xml serialization. |
|
73 | + * |
|
74 | + * An important note: do _not_ create a parent element. Any element |
|
75 | + * implementing XmlSerializable should only ever write what's considered |
|
76 | + * its 'inner xml'. |
|
77 | + * |
|
78 | + * The parent of the current element is responsible for writing a |
|
79 | + * containing element. |
|
80 | + * |
|
81 | + * This allows serializers to be re-used for different element names. |
|
82 | + * |
|
83 | + * If you are opening new elements, you must also close them again. |
|
84 | + */ |
|
85 | + public function xmlSerialize(Writer $writer) |
|
86 | + { |
|
87 | + foreach ($this->getValue() as $val) { |
|
88 | + $writer->startElement('{DAV:}supported-method'); |
|
89 | + $writer->writeAttribute('name', $val); |
|
90 | + $writer->endElement(); |
|
91 | + } |
|
92 | + } |
|
93 | 93 | |
94 | - /** |
|
95 | - * Generate html representation for this value. |
|
96 | - * |
|
97 | - * The html output is 100% trusted, and no effort is being made to sanitize |
|
98 | - * it. It's up to the implementor to sanitize user provided values. |
|
99 | - * |
|
100 | - * The output must be in UTF-8. |
|
101 | - * |
|
102 | - * The baseUri parameter is a url to the root of the application, and can |
|
103 | - * be used to construct local links. |
|
104 | - * |
|
105 | - * @return string |
|
106 | - */ |
|
107 | - public function toHtml(HtmlOutputHelper $html) |
|
108 | - { |
|
109 | - return implode( |
|
110 | - ', ', |
|
111 | - array_map([$html, 'h'], $this->getValue()) |
|
112 | - ); |
|
113 | - } |
|
94 | + /** |
|
95 | + * Generate html representation for this value. |
|
96 | + * |
|
97 | + * The html output is 100% trusted, and no effort is being made to sanitize |
|
98 | + * it. It's up to the implementor to sanitize user provided values. |
|
99 | + * |
|
100 | + * The output must be in UTF-8. |
|
101 | + * |
|
102 | + * The baseUri parameter is a url to the root of the application, and can |
|
103 | + * be used to construct local links. |
|
104 | + * |
|
105 | + * @return string |
|
106 | + */ |
|
107 | + public function toHtml(HtmlOutputHelper $html) |
|
108 | + { |
|
109 | + return implode( |
|
110 | + ', ', |
|
111 | + array_map([$html, 'h'], $this->getValue()) |
|
112 | + ); |
|
113 | + } |
|
114 | 114 | } |
@@ -22,99 +22,99 @@ |
||
22 | 22 | */ |
23 | 23 | class ResourceType extends Element\Elements implements HtmlOutput |
24 | 24 | { |
25 | - /** |
|
26 | - * Constructor. |
|
27 | - * |
|
28 | - * You can either pass null (for no resourcetype), a string (for a single |
|
29 | - * resourcetype) or an array (for multiple). |
|
30 | - * |
|
31 | - * The resourcetype must be specified in clark-notation |
|
32 | - * |
|
33 | - * @param array|string|null $resourceTypes |
|
34 | - */ |
|
35 | - public function __construct($resourceTypes = null) |
|
36 | - { |
|
37 | - parent::__construct((array) $resourceTypes); |
|
38 | - } |
|
25 | + /** |
|
26 | + * Constructor. |
|
27 | + * |
|
28 | + * You can either pass null (for no resourcetype), a string (for a single |
|
29 | + * resourcetype) or an array (for multiple). |
|
30 | + * |
|
31 | + * The resourcetype must be specified in clark-notation |
|
32 | + * |
|
33 | + * @param array|string|null $resourceTypes |
|
34 | + */ |
|
35 | + public function __construct($resourceTypes = null) |
|
36 | + { |
|
37 | + parent::__construct((array) $resourceTypes); |
|
38 | + } |
|
39 | 39 | |
40 | - /** |
|
41 | - * Returns the values in clark-notation. |
|
42 | - * |
|
43 | - * For example array('{DAV:}collection') |
|
44 | - * |
|
45 | - * @return array |
|
46 | - */ |
|
47 | - public function getValue() |
|
48 | - { |
|
49 | - return $this->value; |
|
50 | - } |
|
40 | + /** |
|
41 | + * Returns the values in clark-notation. |
|
42 | + * |
|
43 | + * For example array('{DAV:}collection') |
|
44 | + * |
|
45 | + * @return array |
|
46 | + */ |
|
47 | + public function getValue() |
|
48 | + { |
|
49 | + return $this->value; |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * Checks if the principal contains a certain value. |
|
54 | - * |
|
55 | - * @param string $type |
|
56 | - * |
|
57 | - * @return bool |
|
58 | - */ |
|
59 | - public function is($type) |
|
60 | - { |
|
61 | - return in_array($type, $this->value); |
|
62 | - } |
|
52 | + /** |
|
53 | + * Checks if the principal contains a certain value. |
|
54 | + * |
|
55 | + * @param string $type |
|
56 | + * |
|
57 | + * @return bool |
|
58 | + */ |
|
59 | + public function is($type) |
|
60 | + { |
|
61 | + return in_array($type, $this->value); |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * Adds a resourcetype value to this property. |
|
66 | - * |
|
67 | - * @param string $type |
|
68 | - */ |
|
69 | - public function add($type) |
|
70 | - { |
|
71 | - $this->value[] = $type; |
|
72 | - $this->value = array_unique($this->value); |
|
73 | - } |
|
64 | + /** |
|
65 | + * Adds a resourcetype value to this property. |
|
66 | + * |
|
67 | + * @param string $type |
|
68 | + */ |
|
69 | + public function add($type) |
|
70 | + { |
|
71 | + $this->value[] = $type; |
|
72 | + $this->value = array_unique($this->value); |
|
73 | + } |
|
74 | 74 | |
75 | - /** |
|
76 | - * The deserialize method is called during xml parsing. |
|
77 | - * |
|
78 | - * This method is called statically, this is because in theory this method |
|
79 | - * may be used as a type of constructor, or factory method. |
|
80 | - * |
|
81 | - * Often you want to return an instance of the current class, but you are |
|
82 | - * free to return other data as well. |
|
83 | - * |
|
84 | - * Important note 2: You are responsible for advancing the reader to the |
|
85 | - * next element. Not doing anything will result in a never-ending loop. |
|
86 | - * |
|
87 | - * If you just want to skip parsing for this element altogether, you can |
|
88 | - * just call $reader->next(); |
|
89 | - * |
|
90 | - * $reader->parseInnerTree() will parse the entire sub-tree, and advance to |
|
91 | - * the next element. |
|
92 | - * |
|
93 | - * @return mixed |
|
94 | - */ |
|
95 | - public static function xmlDeserialize(Reader $reader) |
|
96 | - { |
|
97 | - return new self(parent::xmlDeserialize($reader)); |
|
98 | - } |
|
75 | + /** |
|
76 | + * The deserialize method is called during xml parsing. |
|
77 | + * |
|
78 | + * This method is called statically, this is because in theory this method |
|
79 | + * may be used as a type of constructor, or factory method. |
|
80 | + * |
|
81 | + * Often you want to return an instance of the current class, but you are |
|
82 | + * free to return other data as well. |
|
83 | + * |
|
84 | + * Important note 2: You are responsible for advancing the reader to the |
|
85 | + * next element. Not doing anything will result in a never-ending loop. |
|
86 | + * |
|
87 | + * If you just want to skip parsing for this element altogether, you can |
|
88 | + * just call $reader->next(); |
|
89 | + * |
|
90 | + * $reader->parseInnerTree() will parse the entire sub-tree, and advance to |
|
91 | + * the next element. |
|
92 | + * |
|
93 | + * @return mixed |
|
94 | + */ |
|
95 | + public static function xmlDeserialize(Reader $reader) |
|
96 | + { |
|
97 | + return new self(parent::xmlDeserialize($reader)); |
|
98 | + } |
|
99 | 99 | |
100 | - /** |
|
101 | - * Generate html representation for this value. |
|
102 | - * |
|
103 | - * The html output is 100% trusted, and no effort is being made to sanitize |
|
104 | - * it. It's up to the implementor to sanitize user provided values. |
|
105 | - * |
|
106 | - * The output must be in UTF-8. |
|
107 | - * |
|
108 | - * The baseUri parameter is a url to the root of the application, and can |
|
109 | - * be used to construct local links. |
|
110 | - * |
|
111 | - * @return string |
|
112 | - */ |
|
113 | - public function toHtml(HtmlOutputHelper $html) |
|
114 | - { |
|
115 | - return implode( |
|
116 | - ', ', |
|
117 | - array_map([$html, 'xmlName'], $this->getValue()) |
|
118 | - ); |
|
119 | - } |
|
100 | + /** |
|
101 | + * Generate html representation for this value. |
|
102 | + * |
|
103 | + * The html output is 100% trusted, and no effort is being made to sanitize |
|
104 | + * it. It's up to the implementor to sanitize user provided values. |
|
105 | + * |
|
106 | + * The output must be in UTF-8. |
|
107 | + * |
|
108 | + * The baseUri parameter is a url to the root of the application, and can |
|
109 | + * be used to construct local links. |
|
110 | + * |
|
111 | + * @return string |
|
112 | + */ |
|
113 | + public function toHtml(HtmlOutputHelper $html) |
|
114 | + { |
|
115 | + return implode( |
|
116 | + ', ', |
|
117 | + array_map([$html, 'xmlName'], $this->getValue()) |
|
118 | + ); |
|
119 | + } |
|
120 | 120 | } |
@@ -23,81 +23,81 @@ |
||
23 | 23 | */ |
24 | 24 | class GetLastModified implements Element |
25 | 25 | { |
26 | - /** |
|
27 | - * time. |
|
28 | - * |
|
29 | - * @var DateTime |
|
30 | - */ |
|
31 | - public $time; |
|
26 | + /** |
|
27 | + * time. |
|
28 | + * |
|
29 | + * @var DateTime |
|
30 | + */ |
|
31 | + public $time; |
|
32 | 32 | |
33 | - /** |
|
34 | - * Constructor. |
|
35 | - * |
|
36 | - * @param int|DateTime $time |
|
37 | - */ |
|
38 | - public function __construct($time) |
|
39 | - { |
|
40 | - if ($time instanceof DateTime) { |
|
41 | - $this->time = clone $time; |
|
42 | - } else { |
|
43 | - $this->time = new DateTime('@'.$time); |
|
44 | - } |
|
33 | + /** |
|
34 | + * Constructor. |
|
35 | + * |
|
36 | + * @param int|DateTime $time |
|
37 | + */ |
|
38 | + public function __construct($time) |
|
39 | + { |
|
40 | + if ($time instanceof DateTime) { |
|
41 | + $this->time = clone $time; |
|
42 | + } else { |
|
43 | + $this->time = new DateTime('@'.$time); |
|
44 | + } |
|
45 | 45 | |
46 | - // Setting timezone to UTC |
|
47 | - $this->time->setTimezone(new DateTimeZone('UTC')); |
|
48 | - } |
|
46 | + // Setting timezone to UTC |
|
47 | + $this->time->setTimezone(new DateTimeZone('UTC')); |
|
48 | + } |
|
49 | 49 | |
50 | - /** |
|
51 | - * getTime. |
|
52 | - * |
|
53 | - * @return DateTime |
|
54 | - */ |
|
55 | - public function getTime() |
|
56 | - { |
|
57 | - return $this->time; |
|
58 | - } |
|
50 | + /** |
|
51 | + * getTime. |
|
52 | + * |
|
53 | + * @return DateTime |
|
54 | + */ |
|
55 | + public function getTime() |
|
56 | + { |
|
57 | + return $this->time; |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * The serialize method is called during xml writing. |
|
62 | - * |
|
63 | - * It should use the $writer argument to encode this object into XML. |
|
64 | - * |
|
65 | - * Important note: it is not needed to create the parent element. The |
|
66 | - * parent element is already created, and we only have to worry about |
|
67 | - * attributes, child elements and text (if any). |
|
68 | - * |
|
69 | - * Important note 2: If you are writing any new elements, you are also |
|
70 | - * responsible for closing them. |
|
71 | - */ |
|
72 | - public function xmlSerialize(Writer $writer) |
|
73 | - { |
|
74 | - $writer->write( |
|
75 | - HTTP\toDate($this->time) |
|
76 | - ); |
|
77 | - } |
|
60 | + /** |
|
61 | + * The serialize method is called during xml writing. |
|
62 | + * |
|
63 | + * It should use the $writer argument to encode this object into XML. |
|
64 | + * |
|
65 | + * Important note: it is not needed to create the parent element. The |
|
66 | + * parent element is already created, and we only have to worry about |
|
67 | + * attributes, child elements and text (if any). |
|
68 | + * |
|
69 | + * Important note 2: If you are writing any new elements, you are also |
|
70 | + * responsible for closing them. |
|
71 | + */ |
|
72 | + public function xmlSerialize(Writer $writer) |
|
73 | + { |
|
74 | + $writer->write( |
|
75 | + HTTP\toDate($this->time) |
|
76 | + ); |
|
77 | + } |
|
78 | 78 | |
79 | - /** |
|
80 | - * The deserialize method is called during xml parsing. |
|
81 | - * |
|
82 | - * This method is called statically, this is because in theory this method |
|
83 | - * may be used as a type of constructor, or factory method. |
|
84 | - * |
|
85 | - * Often you want to return an instance of the current class, but you are |
|
86 | - * free to return other data as well. |
|
87 | - * |
|
88 | - * Important note 2: You are responsible for advancing the reader to the |
|
89 | - * next element. Not doing anything will result in a never-ending loop. |
|
90 | - * |
|
91 | - * If you just want to skip parsing for this element altogether, you can |
|
92 | - * just call $reader->next(); |
|
93 | - * |
|
94 | - * $reader->parseInnerTree() will parse the entire sub-tree, and advance to |
|
95 | - * the next element. |
|
96 | - * |
|
97 | - * @return mixed |
|
98 | - */ |
|
99 | - public static function xmlDeserialize(Reader $reader) |
|
100 | - { |
|
101 | - return new self(new DateTime($reader->parseInnerTree())); |
|
102 | - } |
|
79 | + /** |
|
80 | + * The deserialize method is called during xml parsing. |
|
81 | + * |
|
82 | + * This method is called statically, this is because in theory this method |
|
83 | + * may be used as a type of constructor, or factory method. |
|
84 | + * |
|
85 | + * Often you want to return an instance of the current class, but you are |
|
86 | + * free to return other data as well. |
|
87 | + * |
|
88 | + * Important note 2: You are responsible for advancing the reader to the |
|
89 | + * next element. Not doing anything will result in a never-ending loop. |
|
90 | + * |
|
91 | + * If you just want to skip parsing for this element altogether, you can |
|
92 | + * just call $reader->next(); |
|
93 | + * |
|
94 | + * $reader->parseInnerTree() will parse the entire sub-tree, and advance to |
|
95 | + * the next element. |
|
96 | + * |
|
97 | + * @return mixed |
|
98 | + */ |
|
99 | + public static function xmlDeserialize(Reader $reader) |
|
100 | + { |
|
101 | + return new self(new DateTime($reader->parseInnerTree())); |
|
102 | + } |
|
103 | 103 | } |
@@ -19,69 +19,69 @@ |
||
19 | 19 | */ |
20 | 20 | class Complex extends XmlFragment |
21 | 21 | { |
22 | - /** |
|
23 | - * The deserialize method is called during xml parsing. |
|
24 | - * |
|
25 | - * This method is called statically, this is because in theory this method |
|
26 | - * may be used as a type of constructor, or factory method. |
|
27 | - * |
|
28 | - * Often you want to return an instance of the current class, but you are |
|
29 | - * free to return other data as well. |
|
30 | - * |
|
31 | - * You are responsible for advancing the reader to the next element. Not |
|
32 | - * doing anything will result in a never-ending loop. |
|
33 | - * |
|
34 | - * If you just want to skip parsing for this element altogether, you can |
|
35 | - * just call $reader->next(); |
|
36 | - * |
|
37 | - * $reader->parseInnerTree() will parse the entire sub-tree, and advance to |
|
38 | - * the next element. |
|
39 | - * |
|
40 | - * @return mixed |
|
41 | - */ |
|
42 | - public static function xmlDeserialize(Reader $reader) |
|
43 | - { |
|
44 | - $xml = $reader->readInnerXml(); |
|
22 | + /** |
|
23 | + * The deserialize method is called during xml parsing. |
|
24 | + * |
|
25 | + * This method is called statically, this is because in theory this method |
|
26 | + * may be used as a type of constructor, or factory method. |
|
27 | + * |
|
28 | + * Often you want to return an instance of the current class, but you are |
|
29 | + * free to return other data as well. |
|
30 | + * |
|
31 | + * You are responsible for advancing the reader to the next element. Not |
|
32 | + * doing anything will result in a never-ending loop. |
|
33 | + * |
|
34 | + * If you just want to skip parsing for this element altogether, you can |
|
35 | + * just call $reader->next(); |
|
36 | + * |
|
37 | + * $reader->parseInnerTree() will parse the entire sub-tree, and advance to |
|
38 | + * the next element. |
|
39 | + * |
|
40 | + * @return mixed |
|
41 | + */ |
|
42 | + public static function xmlDeserialize(Reader $reader) |
|
43 | + { |
|
44 | + $xml = $reader->readInnerXml(); |
|
45 | 45 | |
46 | - if (Reader::ELEMENT === $reader->nodeType && $reader->isEmptyElement) { |
|
47 | - // Easy! |
|
48 | - $reader->next(); |
|
46 | + if (Reader::ELEMENT === $reader->nodeType && $reader->isEmptyElement) { |
|
47 | + // Easy! |
|
48 | + $reader->next(); |
|
49 | 49 | |
50 | - return null; |
|
51 | - } |
|
52 | - // Now we have a copy of the inner xml, we need to traverse it to get |
|
53 | - // all the strings. If there's no non-string data, we just return the |
|
54 | - // string, otherwise we return an instance of this class. |
|
55 | - $reader->read(); |
|
50 | + return null; |
|
51 | + } |
|
52 | + // Now we have a copy of the inner xml, we need to traverse it to get |
|
53 | + // all the strings. If there's no non-string data, we just return the |
|
54 | + // string, otherwise we return an instance of this class. |
|
55 | + $reader->read(); |
|
56 | 56 | |
57 | - $nonText = false; |
|
58 | - $text = ''; |
|
57 | + $nonText = false; |
|
58 | + $text = ''; |
|
59 | 59 | |
60 | - while (true) { |
|
61 | - switch ($reader->nodeType) { |
|
62 | - case Reader::ELEMENT: |
|
63 | - $nonText = true; |
|
64 | - $reader->next(); |
|
65 | - continue 2; |
|
66 | - case Reader::TEXT: |
|
67 | - case Reader::CDATA: |
|
68 | - $text .= $reader->value; |
|
69 | - break; |
|
70 | - case Reader::END_ELEMENT: |
|
71 | - break 2; |
|
72 | - } |
|
73 | - $reader->read(); |
|
74 | - } |
|
60 | + while (true) { |
|
61 | + switch ($reader->nodeType) { |
|
62 | + case Reader::ELEMENT: |
|
63 | + $nonText = true; |
|
64 | + $reader->next(); |
|
65 | + continue 2; |
|
66 | + case Reader::TEXT: |
|
67 | + case Reader::CDATA: |
|
68 | + $text .= $reader->value; |
|
69 | + break; |
|
70 | + case Reader::END_ELEMENT: |
|
71 | + break 2; |
|
72 | + } |
|
73 | + $reader->read(); |
|
74 | + } |
|
75 | 75 | |
76 | - // Make sure we advance the cursor one step further. |
|
77 | - $reader->read(); |
|
76 | + // Make sure we advance the cursor one step further. |
|
77 | + $reader->read(); |
|
78 | 78 | |
79 | - if ($nonText) { |
|
80 | - $new = new self($xml); |
|
79 | + if ($nonText) { |
|
80 | + $new = new self($xml); |
|
81 | 81 | |
82 | - return $new; |
|
83 | - } else { |
|
84 | - return $text; |
|
85 | - } |
|
86 | - } |
|
82 | + return $new; |
|
83 | + } else { |
|
84 | + return $text; |
|
85 | + } |
|
86 | + } |
|
87 | 87 | } |
@@ -22,31 +22,31 @@ |
||
22 | 22 | */ |
23 | 23 | class SupportedLock implements XmlSerializable |
24 | 24 | { |
25 | - /** |
|
26 | - * The xmlSerialize method is called during xml writing. |
|
27 | - * |
|
28 | - * Use the $writer argument to write its own xml serialization. |
|
29 | - * |
|
30 | - * An important note: do _not_ create a parent element. Any element |
|
31 | - * implementing XmlSerializable should only ever write what's considered |
|
32 | - * its 'inner xml'. |
|
33 | - * |
|
34 | - * The parent of the current element is responsible for writing a |
|
35 | - * containing element. |
|
36 | - * |
|
37 | - * This allows serializers to be re-used for different element names. |
|
38 | - * |
|
39 | - * If you are opening new elements, you must also close them again. |
|
40 | - */ |
|
41 | - public function xmlSerialize(Writer $writer) |
|
42 | - { |
|
43 | - $writer->writeElement('{DAV:}lockentry', [ |
|
44 | - '{DAV:}lockscope' => ['{DAV:}exclusive' => null], |
|
45 | - '{DAV:}locktype' => ['{DAV:}write' => null], |
|
46 | - ]); |
|
47 | - $writer->writeElement('{DAV:}lockentry', [ |
|
48 | - '{DAV:}lockscope' => ['{DAV:}shared' => null], |
|
49 | - '{DAV:}locktype' => ['{DAV:}write' => null], |
|
50 | - ]); |
|
51 | - } |
|
25 | + /** |
|
26 | + * The xmlSerialize method is called during xml writing. |
|
27 | + * |
|
28 | + * Use the $writer argument to write its own xml serialization. |
|
29 | + * |
|
30 | + * An important note: do _not_ create a parent element. Any element |
|
31 | + * implementing XmlSerializable should only ever write what's considered |
|
32 | + * its 'inner xml'. |
|
33 | + * |
|
34 | + * The parent of the current element is responsible for writing a |
|
35 | + * containing element. |
|
36 | + * |
|
37 | + * This allows serializers to be re-used for different element names. |
|
38 | + * |
|
39 | + * If you are opening new elements, you must also close them again. |
|
40 | + */ |
|
41 | + public function xmlSerialize(Writer $writer) |
|
42 | + { |
|
43 | + $writer->writeElement('{DAV:}lockentry', [ |
|
44 | + '{DAV:}lockscope' => ['{DAV:}exclusive' => null], |
|
45 | + '{DAV:}locktype' => ['{DAV:}write' => null], |
|
46 | + ]); |
|
47 | + $writer->writeElement('{DAV:}lockentry', [ |
|
48 | + '{DAV:}lockscope' => ['{DAV:}shared' => null], |
|
49 | + '{DAV:}locktype' => ['{DAV:}write' => null], |
|
50 | + ]); |
|
51 | + } |
|
52 | 52 | } |
@@ -17,67 +17,67 @@ |
||
17 | 17 | */ |
18 | 18 | interface IFile extends INode |
19 | 19 | { |
20 | - /** |
|
21 | - * Replaces the contents of the file. |
|
22 | - * |
|
23 | - * The data argument is a readable stream resource. |
|
24 | - * |
|
25 | - * After a successful put operation, you may choose to return an ETag. The |
|
26 | - * etag must always be surrounded by double-quotes. These quotes must |
|
27 | - * appear in the actual string you're returning. |
|
28 | - * |
|
29 | - * Clients may use the ETag from a PUT request to later on make sure that |
|
30 | - * when they update the file, the contents haven't changed in the mean |
|
31 | - * time. |
|
32 | - * |
|
33 | - * If you don't plan to store the file byte-by-byte, and you return a |
|
34 | - * different object on a subsequent GET you are strongly recommended to not |
|
35 | - * return an ETag, and just return null. |
|
36 | - * |
|
37 | - * @param resource|string $data |
|
38 | - * |
|
39 | - * @return string|null |
|
40 | - */ |
|
41 | - public function put($data); |
|
20 | + /** |
|
21 | + * Replaces the contents of the file. |
|
22 | + * |
|
23 | + * The data argument is a readable stream resource. |
|
24 | + * |
|
25 | + * After a successful put operation, you may choose to return an ETag. The |
|
26 | + * etag must always be surrounded by double-quotes. These quotes must |
|
27 | + * appear in the actual string you're returning. |
|
28 | + * |
|
29 | + * Clients may use the ETag from a PUT request to later on make sure that |
|
30 | + * when they update the file, the contents haven't changed in the mean |
|
31 | + * time. |
|
32 | + * |
|
33 | + * If you don't plan to store the file byte-by-byte, and you return a |
|
34 | + * different object on a subsequent GET you are strongly recommended to not |
|
35 | + * return an ETag, and just return null. |
|
36 | + * |
|
37 | + * @param resource|string $data |
|
38 | + * |
|
39 | + * @return string|null |
|
40 | + */ |
|
41 | + public function put($data); |
|
42 | 42 | |
43 | - /** |
|
44 | - * Returns the data. |
|
45 | - * |
|
46 | - * This method may either return a string or a readable stream resource |
|
47 | - * |
|
48 | - * @return mixed |
|
49 | - */ |
|
50 | - public function get(); |
|
43 | + /** |
|
44 | + * Returns the data. |
|
45 | + * |
|
46 | + * This method may either return a string or a readable stream resource |
|
47 | + * |
|
48 | + * @return mixed |
|
49 | + */ |
|
50 | + public function get(); |
|
51 | 51 | |
52 | - /** |
|
53 | - * Returns the mime-type for a file. |
|
54 | - * |
|
55 | - * If null is returned, we'll assume application/octet-stream |
|
56 | - * |
|
57 | - * @return string|null |
|
58 | - */ |
|
59 | - public function getContentType(); |
|
52 | + /** |
|
53 | + * Returns the mime-type for a file. |
|
54 | + * |
|
55 | + * If null is returned, we'll assume application/octet-stream |
|
56 | + * |
|
57 | + * @return string|null |
|
58 | + */ |
|
59 | + public function getContentType(); |
|
60 | 60 | |
61 | - /** |
|
62 | - * Returns the ETag for a file. |
|
63 | - * |
|
64 | - * An ETag is a unique identifier representing the current version of the file. If the file changes, the ETag MUST change. |
|
65 | - * |
|
66 | - * Return null if the ETag can not effectively be determined. |
|
67 | - * |
|
68 | - * The ETag must be surrounded by double-quotes, so something like this |
|
69 | - * would make a valid ETag: |
|
70 | - * |
|
71 | - * return '"someetag"'; |
|
72 | - * |
|
73 | - * @return string|null |
|
74 | - */ |
|
75 | - public function getETag(); |
|
61 | + /** |
|
62 | + * Returns the ETag for a file. |
|
63 | + * |
|
64 | + * An ETag is a unique identifier representing the current version of the file. If the file changes, the ETag MUST change. |
|
65 | + * |
|
66 | + * Return null if the ETag can not effectively be determined. |
|
67 | + * |
|
68 | + * The ETag must be surrounded by double-quotes, so something like this |
|
69 | + * would make a valid ETag: |
|
70 | + * |
|
71 | + * return '"someetag"'; |
|
72 | + * |
|
73 | + * @return string|null |
|
74 | + */ |
|
75 | + public function getETag(); |
|
76 | 76 | |
77 | - /** |
|
78 | - * Returns the size of the node, in bytes. |
|
79 | - * |
|
80 | - * @return int |
|
81 | - */ |
|
82 | - public function getSize(); |
|
77 | + /** |
|
78 | + * Returns the size of the node, in bytes. |
|
79 | + * |
|
80 | + * @return int |
|
81 | + */ |
|
82 | + public function getSize(); |
|
83 | 83 | } |