Constructor
boolean
__construct
([mixed $parameters = null])
-
mixed
$parameters: If null, an empty Principal is created. If it is an integer then that ID is read (if possible). If it is an array then the Principal matching the supplied elements is read. If it is an object then it is expected to be a 'usr' record that was read elsewhere.
Returns a representation of the principal as a collection
void
AsCollection
()
Does this principal exist?
boolean
Exists
()
Split this out so we do it as infrequently as possible, given the cost.
void
FetchProxyGroups
()
Accessor for the group member set - the members of this group
void
GroupMemberSet
()
Accessor for the group membership - the groups this principal is a member of
void
GroupMembership
()
Initialise the Principal object from a $usr record from the DB.
void
InitialiseRecord
(object $usr)
-
object
$usr: The usr record from the DB.
Is this a group principal?
boolean
IsGroup
()
Returns properties which are specific to this principal
void
PrincipalProperty
( $tag, $prop, &$reply, &$denied)
-
$tag
-
$prop
-
&$reply
-
&$denied
Return the privileges bits for the current session user to this resource
void
Privileges
()
Accessor for read or write proxy
void
ProxyFor
(string $type)
-
string
$type: read/write - which sort of proxy list is requested.
Accessor for the read proxy group
void
ReadProxyGroup
()
Render XML for a single Principal (user) from the DB
string
RenderAsXML
(array $properties, &$reply, [boolean $props_only = false], reference $reply)
-
array
$properties: The requested properties for this principal
-
reference
$reply: A reference to the XMLDocument being used for the reply
-
boolean
$props_only: Default false. If true will only return the fragment with the properties, not a full response fragment.
-
&$reply
Work out the username, based on the given e-mail
void
UsernameFromEMail
(string $email)
-
string
$email: The email address to be used.
Work out the username, based on elements of the path.
void
UsernameFromPath
(string $path, [array $options = null])
-
string
$path: The path to be used.
-
array
$options: The request options, controlling whether e-mail paths are allowed.
Accessor for the write proxy group
void
WriteProxyGroup
()