Class CalDAVPrincipal

Description

A class for things to do with a DAV Principal

Located in /inc/CalDAVPrincipal.php (line 25)


	
			
Variable Summary
 Whether $by_email
 caldav-cu-proxy-02: $read_proxy_for
 caldav-cu-proxy-02: $read_proxy_group
 draft-desruisseaux-caldav-sched-03: $schedule_inbox_url
 draft-desruisseaux-caldav-sched-03: $schedule_outbox_url
 The $url
 caldav-cu-proxy-02: $write_proxy_for
 caldav-cu-proxy-02: $write_proxy_group
 RFC3744: $_is_group
Method Summary
 boolean __construct ([mixed $parameters = null])
 void AsCollection ()
 boolean Exists ()
 void GroupMemberSet ()
 void GroupMembership ()
 void InitialiseRecord (object $usr)
 boolean IsGroup ()
 void PrincipalProperty ( $tag,  $prop,  &$reply,  &$denied)
 void Privileges ()
 void ProxyFor (string $type)
 void ReadProxyGroup ()
 string RenderAsXML (array $properties,  &$reply, [boolean $props_only = false], reference $reply)
 void UsernameFromEMail (string $email)
 void UsernameFromPath (string $path, [array $options = null])
 void WriteProxyGroup ()
Variables
Whether $by_email (line 59)
  • var: or not we are using an e-mail address based URL.
RFC4791: $calendar_home_set (line 42)
  • var: Identifies the URL(s) of any WebDAV collections that contain calendar collections owned by the associated principal resource. In DAViCal this is also the place where there might be addressbooks too.
RFC3744: $group_membership (line 74)
  • var: The groups in which the principal is directly a member.
  • access: protected
RFC3744: $group_member_set (line 69)
  • var: The principals that are direct members of this group.
  • access: protected
CardDAV: $principal_address (line 99)
  • var: The URL to an addressbook entry for this principal
  • access: protected
caldav-cu-proxy-02: $read_proxy_for (line 79)
  • var: The principals which this one has read permissions on.
  • access: protected
caldav-cu-proxy-02: $read_proxy_group (line 89)
  • var: The principals which have read permissions on this one.
  • access: protected
draft-desruisseaux-caldav-sched-03: $schedule_inbox_url (line 48)
  • var: Identify the URL of the scheduling Inbox collection owned by the associated principal resource.
draft-desruisseaux-caldav-sched-03: $schedule_outbox_url (line 54)
  • var: Identify the URL of the scheduling Outbox collection owned by the associated principal resource.
The $url (line 30)
  • var: home URL of the principal
caldav-cu-proxy-02: $write_proxy_for (line 84)
  • var: The principals which this one has read-write prmissions for.
  • access: protected
caldav-cu-proxy-02: $write_proxy_group (line 94)
  • var: The principals which have write permissions on this one.
  • access: protected
RFC3744: $_is_group (line 64)
  • var: The principals that are direct members of this group.
  • access: protected
Methods
Constructor __construct (line 111)

Constructor

  • return: Whether we actually read data from the DB to initialise the record.
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.
AsCollection (line 413)

Returns a representation of the principal as a collection

void AsCollection ()
Exists (line 387)

Does this principal exist?

  • return: Whether or not it exists.
boolean Exists ()
FetchProxyGroups (line 245)

Split this out so we do it as infrequently as possible, given the cost.

void FetchProxyGroups ()
GroupMemberSet (line 334)

Accessor for the group member set - the members of this group

void GroupMemberSet ()
GroupMembership (line 325)

Accessor for the group membership - the groups this principal is a member of

void GroupMembership ()
InitialiseRecord (line 168)

Initialise the Principal object from a $usr record from the DB.

void InitialiseRecord (object $usr)
  • object $usr: The usr record from the DB.
IsGroup (line 396)

Is this a group principal?

  • return: Whether this is a group principal
boolean IsGroup ()
PrincipalProperty (line 435)

Returns properties which are specific to this principal

void PrincipalProperty ( $tag,  $prop,  &$reply,  &$denied)
  • $tag
  • $prop
  • &$reply
  • &$denied
Privileges (line 404)

Return the privileges bits for the current session user to this resource

void Privileges ()
ProxyFor (line 315)

Accessor for read or write proxy

void ProxyFor (string $type)
  • string $type: read/write - which sort of proxy list is requested.
ReadProxyGroup (line 296)

Accessor for the read proxy group

void ReadProxyGroup ()
RenderAsXML (line 550)

Render XML for a single Principal (user) from the DB

  • return: An XML fragment with the requested properties for this principal
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
UsernameFromEMail (line 371)

Work out the username, based on the given e-mail

void UsernameFromEMail (string $email)
  • string $email: The email address to be used.
UsernameFromPath (line 345)

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.
WriteProxyGroup (line 305)

Accessor for the write proxy group

void WriteProxyGroup ()

Documentation generated on Tue, 09 Mar 2010 10:08:43 +1300 by phpDocumentor 1.3.2