Class DAVResource

Description

A class for things to do with a DAV Resource

Located in /inc/DAVResource.php (line 20)


	
			
Variable Summary
Method Summary
 DAVResource __construct ([mixed $parameters = null])
 void BuildPrivileges ([ $privilege_names = null], [ &$xmldoc = null])
 void BuildSupportedReports ( &$reply)
 void ContainerType ()
 void dav_name ()
 void Exists ()
 void FetchCollection ()
 void FetchPrincipal ()
 void FetchPrivileges ()
 void FetchResource ()
 void FromPath (object $inpath)
 void FromRow (object $row)
 void GetProperty ( $name)
 string GetPropStat (array $properties,  &$reply, [ $props_only = false])
 void HavePrivilegeTo ( $do_what)
 void IsAddressbook ()
 void IsCalendar ()
 void IsCollection ()
 void IsLocked ([ $depth = 0])
 void IsPrincipal ()
 void IsPublic ()
 void IsSchedulingCollection ([string $type = 'any'])
 void principal_url ()
 void Privileges ()
 string RenderAsXML (array $properties,  &$reply, [boolean $props_only = false], reference $reply)
 void ResourceProperty ( $tag,  $prop,  &$reply,  &$denied)
 void unique_tag ()
Variables
The $contenttype (line 50)
  • var: type of the content
  • access: protected
The $dav_name (line 25)
  • var: partial URL of the resource within our namespace
  • access: protected
Boolean: $exists (line 30)
  • var: does the resource actually exist yet?
  • access: protected
The $resource (line 40)
  • var: actual resource content, if it exists and is not a collection
  • access: protected
The $resourcetypes (line 45)
  • var: types of the resource, possibly multiple
  • access: protected
The $unique_tag (line 35)
  • var: unique etag associated with the current version of the resource
  • access: protected
Methods
Constructor __construct (line 118)

Constructor

DAVResource __construct ([mixed $parameters = null])
  • mixed $parameters: If null, an empty Resourced is created. If it is an object then it is expected to be a record that was read elsewhere.
BuildPrivileges (line 512)

Returns the array of privilege names converted into XMLElements

void BuildPrivileges ([ $privilege_names = null], [ &$xmldoc = null])
  • $privilege_names
  • &$xmldoc
BuildSupportedMethods (line 605)

Returns the array of supported methods converted into XMLElements

void BuildSupportedMethods ()
BuildSupportedReports (line 647)

Returns the array of supported reports converted into XMLElements

void BuildSupportedReports ( &$reply)
  • &$reply
ContainerType (line 804)

Return the type of whatever contains this resource, or would if it existed.

void ContainerType ()
DAV_AllProperties (line 883)

Return an array which is an expansion of the DAV::allprop

void DAV_AllProperties ()
dav_name (line 761)

Returns the dav_name of the resource in our internal namespace

void dav_name ()
Exists (line 743)

Checks whether this resource actually exists, in the virtual sense, within the hierarchy

void Exists ()
FetchCollection (line 257)

Find the collection associated with this resource.

void FetchCollection ()
FetchDeadProperties (line 436)

Fetch any dead properties for this URL

void FetchDeadProperties ()
FetchPrincipal (line 387)

Find the principal associated with this resource.

void FetchPrincipal ()
FetchPrivileges (line 452)

Build permissions for this URL

void FetchPrivileges ()
FetchResource (line 404)

Retrieve the actual resource.

void FetchResource ()
FetchSupportedMethods (line 535)

Returns the array of supported methods

void FetchSupportedMethods ()
FetchSupportedReports (line 619)

Returns the array of supported reports

void FetchSupportedReports ()
FromPath (line 237)

Initialise from a path

void FromPath (object $inpath)
  • object $inpath: The path to populate the resource data from
FromRow (line 155)

Initialise from a database row

void FromRow (object $row)
  • object $row: The row from the DB.
GetProperty (line 838)

Return general server-related properties, in plain form

void GetProperty ( $name)
  • $name
GetPropStat (line 1081)

Construct XML propstat fragment for this resource

  • return: An XML fragment with the requested properties for this resource
string GetPropStat (array $properties,  &$reply, [ $props_only = false])
  • array $properties: of string $properties The requested properties for this resource
  • &$reply
  • $props_only
HavePrivilegeTo (line 501)

Is the user has the privileges to do what is requested.

void HavePrivilegeTo ( $do_what)
  • $do_what
IsAddressbook (line 735)

Checks whether this resource is an addressbook

void IsAddressbook ()
IsCalendar (line 715)

Checks whether this resource is a calendar

void IsCalendar ()
IsCollection (line 699)

Checks whether this resource is a collection

void IsCollection ()
IsLocked (line 667)

Checks whether the resource is locked, returning any lock token, or false

  • todo: This logic does not catch all locking scenarios. For example an infinite depth request should check the permissions for all collections and resources within that. At present we only maintain permissions on a per-collection basis though.
void IsLocked ([ $depth = 0])
  • $depth
IsPrincipal (line 707)

Checks whether this resource is a principal

void IsPrincipal ()
IsPublic (line 796)

Checks whether the target collection is publicly_readable

void IsPublic ()
IsSchedulingCollection (line 724)

Checks whether this resource is a calendar

void IsSchedulingCollection ([string $type = 'any'])
  • string $type: The type of scheduling collection, 'read', 'write' or 'any'
principal_url (line 770)

Returns the principal-URL for this resource

void principal_url ()
Privileges (line 492)

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

void Privileges ()
RenderAsXML (line 1140)

Render XML for this resource

  • 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
ResourceProperty (line 900)

Return general server-related properties for this URL

void ResourceProperty ( $tag,  $prop,  &$reply,  &$denied)
  • $tag
  • $prop
  • &$reply
  • &$denied
unique_tag (line 782)

Returns the principal-URL for this resource

void unique_tag ()

Documentation generated on Thu, 24 Dec 2009 22:09:53 +1300 by phpDocumentor 1.3.2