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
 

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 95 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 361 of file DAVPrincipal.php.

◆ AsCollection()

DAVPrincipal::AsCollection ( )

Returns a representation of the principal as a collection

Definition at line 422 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 388 of file DAVPrincipal.php.

◆ calendar_home_set()

DAVPrincipal::calendar_home_set ( )

Get the calendar_home_set, as lazily as possible

Definition at line 338 of file DAVPrincipal.php.

◆ FetchProxyGroups()

DAVPrincipal::FetchProxyGroups ( )

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

Definition at line 194 of file DAVPrincipal.php.

◆ GetProperty()

DAVPrincipal::GetProperty (   $property_id)

Return an arbitrary property

Returns
string The name of the arbitrary property

Definition at line 305 of file DAVPrincipal.php.

◆ GroupMemberSet()

DAVPrincipal::GroupMemberSet ( )

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

Definition at line 286 of file DAVPrincipal.php.

◆ GroupMembership()

DAVPrincipal::GroupMembership ( )

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

Definition at line 277 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 144 of file DAVPrincipal.php.

◆ IsGroup()

DAVPrincipal::IsGroup ( )

Is this a group principal?

Returns
boolean Whether this is a group principal

Definition at line 296 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 453 of file DAVPrincipal.php.

◆ Privileges()

DAVPrincipal::Privileges ( )

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

Definition at line 406 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 267 of file DAVPrincipal.php.

◆ ReadProxyGroup()

DAVPrincipal::ReadProxyGroup ( )

Accessor for the read proxy group

Definition at line 248 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 606 of file DAVPrincipal.php.

◆ unique_tag()

DAVPrincipal::unique_tag ( )

Returns the unique_tag (ETag or getctag) for this resource

Definition at line 326 of file DAVPrincipal.php.

◆ WriteProxyGroup()

DAVPrincipal::WriteProxyGroup ( )

Accessor for the write proxy group

Definition at line 257 of file DAVPrincipal.php.


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