privileges = $privileges; $this->prefixBaseUrl = $prefixBaseUrl; } /** * Returns the list of privileges for this property. * * @return array */ public function getPrivileges() { return $this->privileges; } /** * The xmlSerialize method is called during xml writing. * * 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. * * @param Writer $writer */ public function xmlSerialize(Writer $writer) { foreach ($this->privileges as $ace) { $this->serializeAce($writer, $ace); } } /** * Generate html representation for this value. * * 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. * * @param HtmlOutputHelper $html * * @return string */ public function toHtml(HtmlOutputHelper $html) { ob_start(); echo '
Principal | Privilege | ||
---|---|---|---|
', $html->xmlName($privilege['principal']), ' | '; } else { echo '', $html->link($privilege['principal']), ' | '; } echo '', $html->xmlName($privilege['privilege']), ' | '; echo ''; if (!empty($privilege['protected'])) { echo '(protected)'; } echo ' | '; echo '