64 foreach ($this->privileges as $privName) {
68 $writer->endElement();
82 function has($privilegeName) {
84 return in_array($privilegeName, $this->privileges);
124 $tree =
$reader->parseInnerTree([
'{DAV:}privilege' =>
'Sabre\\Xml\\Element\\Elements']);
125 foreach (
$tree as $element) {
126 if ($element[
'name'] !==
'{DAV:}privilege') {
129 $result[] = $element[
'value'][0];
An exception for terminatinating execution or to throw for unit testing.
__construct(array $privileges)
Creates the object.
xmlSerialize(Writer $writer)
The xmlSerialize method is called during xml writing.
getValue()
Returns the list of privileges.
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
toHtml(HtmlOutputHelper $html)
Generate html representation for this value.
has($privilegeName)
Returns true or false, whether the specified principal appears in the list.
This class provides a few utility functions for easily generating HTML for the browser plugin.
The Reader class expands upon PHP's built-in XMLReader.
writeElement($name, $content=null)
Write a full element tag and it's contents.
startElement($name)
Opens a new element.
WebDAV properties that implement this interface are able to generate their own html output for the br...
This is the XML element interface.