SupportedPrivilegeSet
in package
implements
XmlSerializable, HtmlOutput
SupportedPrivilegeSet property.
This property encodes the {DAV:}supported-privilege-set property, as defined in rfc3744. Please consult the rfc for details about it's structure.
This class expects a structure like the one given from Sabre\DAVACL\Plugin::getSupportedPrivilegeSet as the argument in its constructor.
Tags
Interfaces, Classes and Traits
- XmlSerializable
- Objects implementing XmlSerializable can control how they are represented in Xml.
- HtmlOutput
- WebDAV properties that implement this interface are able to generate their own html output for the browser plugin.
Table of Contents
- $privileges : array<string|int, mixed>
- privileges.
- __construct() : mixed
- Constructor.
- getValue() : array<string|int, mixed>
- Returns the privilege value.
- toHtml() : string
- Generate html representation for this value.
- xmlSerialize() : mixed
- The xmlSerialize method is called during xml writing.
- serializePriv() : mixed
- Serializes a property.
Properties
$privileges
privileges.
protected
array<string|int, mixed>
$privileges
Methods
__construct()
Constructor.
public
__construct(array<string|int, mixed> $privileges) : mixed
Parameters
- $privileges : array<string|int, mixed>
Return values
mixed —getValue()
Returns the privilege value.
public
getValue() : array<string|int, mixed>
Return values
array<string|int, mixed> —toHtml()
Generate html representation for this value.
public
toHtml(HtmlOutputHelper $html) : string
The html output is 100% trusted, and no effort is being made to sanitize it. It's up to the implementor to sanitize user provided values.
The output must be in UTF-8.
The baseUri parameter is a url to the root of the application, and can be used to construct local links.
Parameters
- $html : HtmlOutputHelper
Return values
string —xmlSerialize()
The xmlSerialize method is called during xml writing.
public
xmlSerialize(Writer $writer) : mixed
Use the $writer argument to write its own xml serialization.
An important note: do not create a parent element. Any element implementing XmlSerializable should only ever write what's considered its 'inner xml'.
The parent of the current element is responsible for writing a containing element.
This allows serializers to be re-used for different element names.
If you are opening new elements, you must also close them again.
Parameters
- $writer : Writer
Return values
mixed —serializePriv()
Serializes a property.
private
serializePriv(Writer $writer, string $privName, array<string|int, mixed> $privilege) : mixed
This is a recursive function.
Parameters
- $writer : Writer
- $privName : string
- $privilege : array<string|int, mixed>