ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Lock.php
Go to the documentation of this file.
1<?php
2
4
9
21class Lock implements XmlDeserializable {
22
28 public $owner;
29
36 public $scope;
37
59 static function xmlDeserialize(Reader $reader) {
60
61 $reader->pushContext();
62 $reader->elementMap['{DAV:}owner'] = 'Sabre\\Xml\\Element\\XmlFragment';
63
65
66 $reader->popContext();
67
68 $new = new self();
69 $new->owner = !empty($values['{DAV:}owner']) ? $values['{DAV:}owner']->getXml() : null;
70 $new->scope = LockInfo::SHARED;
71
72 if (isset($values['{DAV:}lockscope'])) {
73 foreach ($values['{DAV:}lockscope'] as $elem) {
74 if ($elem['name'] === '{DAV:}exclusive') $new->scope = LockInfo::EXCLUSIVE;
75 }
76 }
77 return $new;
78
79 }
80
81}
An exception for terminatinating execution or to throw for unit testing.
LockInfo class.
Definition: LockInfo.php:15
const EXCLUSIVE
An exclusive lock.
Definition: LockInfo.php:25
const SHARED
A shared lock.
Definition: LockInfo.php:20
WebDAV LOCK request parser.
Definition: Lock.php:21
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
Definition: Lock.php:59
'KeyValue' parses out all child elements from a single node, and outputs a key=>value struct.
Definition: KeyValue.php:36
static xmlDeserialize(Xml\Reader $reader)
The deserialize method is called during xml parsing.
Definition: KeyValue.php:102
The Reader class expands upon PHP's built-in XMLReader.
Definition: Reader.php:20
Implementing the XmlDeserializable interface allows you to use a class as a deserializer for a specif...
$values