92 if (property_exists($this, $k)) {
95 throw new \InvalidArgumentException(
'Unknown property: ' . $k);
125 new Href($this->href),
126 '{DAV:}prop' => $this->properties,
127 '{DAV:}share-access' =>
new ShareAccess($this->access),
129 switch ($this->inviteStatus) {
170 $reader->pushContext();
171 $reader->elementMap[
'{DAV:}share-access'] =
'Sabre\DAV\Xml\Property\ShareAccess';
172 $reader->elementMap[
'{DAV:}prop'] =
'Sabre\Xml\Deserializer\keyValue';
177 $reader->popContext();
179 $sharee =
new self();
180 if (!isset($elems[
'href'])) {
181 throw new BadRequest(
'Every {DAV:}sharee must have a {DAV:}href child-element');
183 $sharee->href = $elems[
'href'];
185 if (isset($elems[
'prop'])) {
186 $sharee->properties = $elems[
'prop'];
188 if (isset($elems[
'comment'])) {
189 $sharee->comment = $elems[
'comment'];
191 if (!isset($elems[
'share-access'])) {
192 throw new BadRequest(
'Every {DAV:}sharee must have a {DAV:}share-access child element');
194 $sharee->access = $elems[
'share-access']->getValue();
This class represents the {DAV:}sharee element.
keyValue(Reader $reader, $namespace=null)
This class provides a number of 'deserializer' helper functions.
The Reader class expands upon PHP's built-in XMLReader.
__construct(array $properties=[])
Creates the object.
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
This is the XML element interface.
write($value)
Writes a value to the output stream.
This class represents the {DAV:}share-access property.
writeElement($name, $content=null)
Write a full element tag and it's contents.
xmlSerialize(Writer $writer)
The xmlSerialize method is called during xml writing.