DAViCal
DAVPrincipal Class Reference
Inheritance diagram for DAVPrincipal:
Collaboration diagram for DAVPrincipal:

Public Member Functions

 __construct ( $parameters=null)
 
 InitialiseRecord ()
 
 FetchProxyGroups ()
 
 ReadProxyGroup ()
 
 WriteProxyGroup ()
 
 ProxyFor ( $type)
 
 GroupMembership ()
 
 GroupMemberSet ()
 
 IsGroup ()
 
 GetProperty ( $property_id)
 
 unique_tag ()
 
 calendar_home_set ()
 
 addressbook_home_set ()
 
 calendar_free_busy_set ()
 
 Privileges ()
 
 AsCollection ()
 
 PropertySearch ( $parameters)
 
 PrincipalProperty ( $tag, $prop, &$reply, &$denied)
 
 RenderAsXML ( $properties, &$reply, $props_only=false)
 
- Public Member Functions inherited from Principal
 __construct ( $type, $value, $use_cache=true)
 
 __get ( $property)
 
 __isset ( $property)
 
 Exists ()
 
 byEmail ()
 
 username ()
 
 setUsername ($new_username)
 
 user_no ()
 
 principal_id ()
 
 email ()
 
 dav_name ()
 
 default_calendar ()
 
 url ($type='principal', $internal=false)
 
 internal_url ($type='principal')
 
 unCache ()
 
 Create ( $field_values)
 
 Update ( $field_values)
 

Protected Attributes

 $_is_group
 
- Protected Attributes inherited from Principal
 $username
 
 $user_no
 
 $principal_id
 
 $email
 
 $dav_name
 
 $exists
 
 $url
 
 $original_request_url
 
 $by_email
 
 $collections
 
 $dead_properties
 
 $default_calendar
 

Private Attributes

 $calendar_home_set
 
 $addressbook_home_set
 
 $calendar_free_busy_set
 
 $group_member_set
 
 $group_membership
 
 $read_proxy_for
 
 $write_proxy_for
 
 $read_proxy_group
 
 $write_proxy_group
 
 $principal_address
 
 $unique_tag
 
 $user_address_set
 

Additional Inherited Members

- Static Public Member Functions inherited from Principal
static updateableFields ()
 
static cacheFlush ( $where, $whereparams=array())
 
static cacheDelete ( $type, $value)
 
- Public Attributes inherited from Principal
 $user_active
 
 $created
 
 $modified
 
 $password
 
 $fullname
 
 $email_ok
 
 $date_format_type
 
 $locale
 
 $type_id
 
 $displayname
 
 $default_privileges
 
 $is_principal
 
 $is_calendar
 
 $collection_id
 
 $is_addressbook
 
 $resourcetypes
 
 $privileges
 
- Protected Member Functions inherited from Principal
 FetchDeadProperties ()
 
 FetchCollections ()
 

Detailed Description

Definition at line 19 of file DAVPrincipal.php.

Constructor & Destructor Documentation

◆ __construct()

DAVPrincipal::__construct (   $parameters = null)

Constructor

Parameters
mixed$parametersIf 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
boolean Whether we actually read data from the DB to initialise the record.

Definition at line 97 of file DAVPrincipal.php.

Member Function Documentation

◆ addressbook_home_set()

DAVPrincipal::addressbook_home_set ( )

Get the addressbook_home_set, as lazily as possible

Definition at line 367 of file DAVPrincipal.php.

◆ AsCollection()

DAVPrincipal::AsCollection ( )

Returns a representation of the principal as a collection

Definition at line 428 of file DAVPrincipal.php.

◆ calendar_free_busy_set()

DAVPrincipal::calendar_free_busy_set ( )

The property calendar-free-busy-set has been dropped from draft 5 of the scheduling extensions for CalDAV, and is not present in the final official RFC (6638). Hence, by default we do not call this method and do not populate the property. Enable the config value $c->support_obsolete_free_busy_property if you really need it, however be aware that performance may be adversely affected if you do so, since the resulting query over the collection table is slow.

Definition at line 394 of file DAVPrincipal.php.

◆ calendar_home_set()

DAVPrincipal::calendar_home_set ( )

Get the calendar_home_set, as lazily as possible

Definition at line 344 of file DAVPrincipal.php.

◆ FetchProxyGroups()

DAVPrincipal::FetchProxyGroups ( )

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

Definition at line 196 of file DAVPrincipal.php.

◆ GetProperty()

DAVPrincipal::GetProperty (   $property_id)

Return an arbitrary property

Returns
string The name of the arbitrary property

Definition at line 311 of file DAVPrincipal.php.

◆ GroupMemberSet()

DAVPrincipal::GroupMemberSet ( )

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

Definition at line 292 of file DAVPrincipal.php.

◆ GroupMembership()

DAVPrincipal::GroupMembership ( )

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

Definition at line 283 of file DAVPrincipal.php.

◆ InitialiseRecord()

DAVPrincipal::InitialiseRecord ( )

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

Parameters
object$usrThe usr record from the DB.

Definition at line 146 of file DAVPrincipal.php.

◆ IsGroup()

DAVPrincipal::IsGroup ( )

Is this a group principal?

Returns
boolean Whether this is a group principal

Definition at line 302 of file DAVPrincipal.php.

◆ PrincipalProperty()

DAVPrincipal::PrincipalProperty (   $tag,
  $prop,
$reply,
$denied 
)

Returns properties which are specific to this principal

Use the principal's locale by preference, otherwise system default

regular group principal, the calendar-proxy pseudo-principal is handled in DAVResource

Note that this property was dropped from the scheduling extensions for CalDAV. We only populate it if the config value support_obsolete_free_busy_property is set. This should not be enabled unless your CalDAV client requires the property; beware that doing so may also adversely affect PROPFIND performance.

See https://tools.ietf.org/html/rfc6638#section-2.4.2 and https://tools.ietf.org/html/rfc5545#section-3.2.3

Todo:
indicating the style for future expansion

Definition at line 459 of file DAVPrincipal.php.

◆ Privileges()

DAVPrincipal::Privileges ( )

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

Definition at line 412 of file DAVPrincipal.php.

◆ PropertySearch()

DAVPrincipal::PropertySearch (   $parameters)

Definition at line 452 of file DAVPrincipal.php.

◆ ProxyFor()

DAVPrincipal::ProxyFor (   $type)

Accessor for read or write proxy

Parameters
stringread/write - which sort of proxy list is requested.

Definition at line 273 of file DAVPrincipal.php.

◆ ReadProxyGroup()

DAVPrincipal::ReadProxyGroup ( )

Accessor for the read proxy group

Definition at line 254 of file DAVPrincipal.php.

◆ RenderAsXML()

DAVPrincipal::RenderAsXML (   $properties,
$reply,
  $props_only = false 
)

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

Parameters
array$propertiesThe requested properties for this principal
reference$replyA reference to the XMLDocument being used for the reply
boolean$props_onlyDefault false. If true will only return the fragment with the properties, not a full response fragment.
Returns
string An XML fragment with the requested properties for this principal

Definition at line 612 of file DAVPrincipal.php.

◆ unique_tag()

DAVPrincipal::unique_tag ( )

Returns the unique_tag (ETag or getctag) for this resource

Definition at line 332 of file DAVPrincipal.php.

◆ WriteProxyGroup()

DAVPrincipal::WriteProxyGroup ( )

Accessor for the write proxy group

Definition at line 263 of file DAVPrincipal.php.

Member Data Documentation

◆ $_is_group

DAVPrincipal::$_is_group
protected

Definition at line 42 of file DAVPrincipal.php.

◆ $addressbook_home_set

DAVPrincipal::$addressbook_home_set
private

Definition at line 32 of file DAVPrincipal.php.

◆ $calendar_free_busy_set

DAVPrincipal::$calendar_free_busy_set
private

Definition at line 37 of file DAVPrincipal.php.

◆ $calendar_home_set

DAVPrincipal::$calendar_home_set
private

Definition at line 26 of file DAVPrincipal.php.

◆ $group_member_set

DAVPrincipal::$group_member_set
private

Definition at line 47 of file DAVPrincipal.php.

◆ $group_membership

DAVPrincipal::$group_membership
private

Definition at line 52 of file DAVPrincipal.php.

◆ $principal_address

DAVPrincipal::$principal_address
private

Definition at line 77 of file DAVPrincipal.php.

◆ $read_proxy_for

DAVPrincipal::$read_proxy_for
private

Definition at line 57 of file DAVPrincipal.php.

◆ $read_proxy_group

DAVPrincipal::$read_proxy_group
private

Definition at line 67 of file DAVPrincipal.php.

◆ $unique_tag

DAVPrincipal::$unique_tag
private

Definition at line 83 of file DAVPrincipal.php.

◆ $user_address_set

DAVPrincipal::$user_address_set
private

Definition at line 85 of file DAVPrincipal.php.

◆ $write_proxy_for

DAVPrincipal::$write_proxy_for
private

Definition at line 62 of file DAVPrincipal.php.

◆ $write_proxy_group

DAVPrincipal::$write_proxy_group
private

Definition at line 72 of file DAVPrincipal.php.


The documentation for this class was generated from the following file: