Methods summary
public
|
#
__construct( mixed $parameters = null )
Constructor
Parameters
- $parameters
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.
|
public
|
#
FromRow( object $row )
Initialise from a database row
Initialise from a database row
Parameters
- $row
object $row The row from the DB.
|
public
|
#
FromPath( object $inpath )
Initialise from a path
Parameters
- $inpath
object $inpath The path to populate the resource data from
|
protected
|
#
FetchCollection( )
Find the collection associated with this resource.
Find the collection associated with this resource.
|
protected
|
#
FetchPrincipal( )
Find the principal associated with this resource.
Find the principal associated with this resource.
|
protected
|
#
FetchResource( )
Retrieve the actual resource.
Retrieve the actual resource.
|
protected
|
#
FetchDeadProperties( )
Fetch any dead properties for this URL
Fetch any dead properties for this URL
|
public static
|
#
BuildDeadPropertyXML( mixed $property_name, mixed $raw_string )
FIXME: does this function return a string or an array, or either? It used to
be string only, but b4fd9e2e changed successfully parsed values to array.
However values not in angle brackets are passed through, and those seem to be
the majority in my database?!
FIXME: does this function return a string or an array, or either? It used to
be string only, but b4fd9e2e changed successfully parsed values to array.
However values not in angle brackets are passed through, and those seem to be
the majority in my database?!
|
protected
|
#
FetchPrivileges( )
Build permissions for this URL
Build permissions for this URL
|
public
|
#
GetParentContainer( )
Get a DAVResource which is the parent to this resource.
Get a DAVResource which is the parent to this resource.
|
public
|
#
FetchParentContainer( )
Fetch the parent to this resource. This is deprecated - use
GetParentContainer() instead.
Fetch the parent to this resource. This is deprecated - use
GetParentContainer() instead.
Deprecated
|
public
|
#
Privileges( )
Return the privileges bits for the current session user to this resource
Return the privileges bits for the current session user to this resource
|
public
boolean
|
#
HavePrivilegeTo( mixed $do_what, mixed $any = null )
Does the user have the privileges to do what is requested.
Does the user have the privileges to do what is requested.
Parameters
- $do_what
mixed $do_what mixed The request privilege name, or array of privilege names, to be
checked.
- $any
mixed $any boolean Whether we accept any of the privileges. The default is true,
unless the requested privilege is 'all', when it is false.
Returns
boolean Whether they do have one of those privileges against this resource.
|
public
|
#
NeedPrivilege( string $privilege, boolean $any = null )
Check if we have the needed privilege or send an error response. If the user
does not have the privileges then the call will not return, and an XML error
document will be output.
Check if we have the needed privilege or send an error response. If the user
does not have the privileges then the call will not return, and an XML error
document will be output.
Parameters
- $privilege
string $privilege The name of the needed privilege.
- $any
boolean $any Whether we accept any of the privileges. The default is true, unless the
requested privilege is 'all', when it is false.
|
public
|
#
BuildPrivileges( mixed $privilege_names = null, mixed & $xmldoc = null )
Returns the array of privilege names converted into XMLElements
Returns the array of privilege names converted into XMLElements
|
public
|
|
public
|
#
BuildSupportedMethods( )
Returns the array of supported methods converted into XMLElements
Returns the array of supported methods converted into XMLElements
|
public
|
|
public
|
#
BuildSupportedReports( mixed & $reply )
Returns the array of supported reports converted into XMLElements
Returns the array of supported reports converted into XMLElements
|
public
|
#
FetchTickets( )
Fetches an array of the access_ticket records applying to this path
Fetches an array of the access_ticket records applying to this path
|
public
XMLTreeFragment
|
#
BuildTicketinfo( &XMLDocument & $reply )
Returns the array of tickets converted into XMLElements
Returns the array of tickets converted into XMLElements
If the current user does not have DAV::read-acl privilege on this resource
they will only get to see the tickets where they are the owner, or which they
supplied along with the request.
Parameters
- $reply
&XMLDocument $reply A reference to the XMLDocument used to construct the reply
Returns
XMLTreeFragment A fragment of an XMLDocument to go in the reply
|
public
|
#
IsLocked( mixed $depth = 0 )
Checks whether the resource is locked, returning any lock token, or false
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.
|
public
|
#
IsCollection( )
Checks whether this resource is a collection
Checks whether this resource is a collection
|
public
|
#
IsPrincipal( )
Checks whether this resource is a principal
Checks whether this resource is a principal
|
public
|
#
IsCalendar( )
Checks whether this resource is a calendar
Checks whether this resource is a calendar
|
public
|
#
IsSchedulingCollection( string $type = 'any' )
Checks whether this resource is a scheduling inbox/outbox collection
Checks whether this resource is a scheduling inbox/outbox collection
Parameters
- $type
string $type The type of scheduling collection, 'inbox', 'outbox' or 'any'
|
public
|
#
IsInSchedulingCollection( string $type = 'any' )
Checks whether this resource is IN a scheduling inbox/outbox collection
Checks whether this resource is IN a scheduling inbox/outbox collection
Parameters
- $type
string $type The type of scheduling collection, 'inbox', 'outbox' or 'any'
|
public
|
#
IsAddressbook( )
Checks whether this resource is an addressbook
Checks whether this resource is an addressbook
|
public
|
#
IsBinding( )
Checks whether this resource is a bind to another resource
Checks whether this resource is a bind to another resource
|
public
|
#
IsExternal( )
Checks whether this resource is a bind to an external resource
Checks whether this resource is a bind to an external resource
|
public
|
#
Exists( )
Checks whether this resource actually exists, in the virtual sense, within
the hierarchy
Checks whether this resource actually exists, in the virtual sense, within
the hierarchy
|
public
|
#
ContainerExists( )
Checks whether the container for this resource actually exists, in the
virtual sense, within the hierarchy
Checks whether the container for this resource actually exists, in the
virtual sense, within the hierarchy
|
public
|
#
url( )
Returns the URL of our resource
Returns the URL of our resource
|
public
|
#
dav_name( )
Returns the dav_name of the resource in our internal namespace
Returns the dav_name of the resource in our internal namespace
|
public
|
#
bound_from( )
Returns the dav_name of the resource we are bound to, within our internal
namespace
Returns the dav_name of the resource we are bound to, within our internal
namespace
|
public
|
#
set_bind_location( mixed $new_dav_name )
Sets the dav_name of the resource we are bound as
Sets the dav_name of the resource we are bound as
|
public
|
#
parent_path( )
Returns the dav_name of the resource in our internal namespace
Returns the dav_name of the resource in our internal namespace
|
public
|
#
principal_url( )
Returns the principal-URL for this resource
Returns the principal-URL for this resource
|
public
|
#
user_no( )
Returns the internal user_no for the principal for this resource
Returns the internal user_no for the principal for this resource
|
public
|
#
collection_id( )
Returns the internal collection_id for this collection, or the collection
containing this resource
Returns the internal collection_id for this collection, or the collection
containing this resource
|
public
|
#
resource( )
Returns the database row for this resource
Returns the database row for this resource
|
public
|
#
unique_tag( )
Returns the unique_tag (ETag or getctag) for this resource
Returns the unique_tag (ETag or getctag) for this resource
|
public
|
#
resource_id( )
Returns the definitive resource_id for this resource - usually a dav_id
Returns the definitive resource_id for this resource - usually a dav_id
|
public
|
#
sync_token( mixed $cachedOK = true )
Returns the current sync_token for this collection, or the containing
collection
Returns the current sync_token for this collection, or the containing
collection
|
public
|
#
IsPublic( )
Checks whether the target collection is publicly_readable
Checks whether the target collection is publicly_readable
|
public
|
#
IsPublicOnly( )
Checks whether the target collection is for public events only
Checks whether the target collection is for public events only
|
public
|
#
ContainerType( )
Return the type of whatever contains this resource, or would if it
existed.
Return the type of whatever contains this resource, or would if it
existed.
|
public
|
#
BuildACE( mixed & $xmldoc, mixed $privs, mixed $principal )
BuildACE - construct an XMLElement subtree for a DAV::ace
BuildACE - construct an XMLElement subtree for a DAV::ace
|
public
|
|
public
|
#
GetProperty( mixed $name )
Return general server-related properties, in plain form
Return general server-related properties, in plain form
|
public
|
#
DAV_AllProperties( )
Return an array which is an expansion of the DAV::allprop
Return an array which is an expansion of the DAV::allprop
|
public
|
#
ResourceProperty( mixed $tag, mixed $prop, mixed & $reply, mixed & $denied )
Return general server-related properties for this URL
Return general server-related properties for this URL
|
public
string
|
#
GetPropStat( array $properties, mixed & $reply, mixed $props_only = false )
Construct XML propstat fragment for this resource
Construct XML propstat fragment for this resource
Parameters
- $properties
array of string $properties The requested properties for this resource
- $reply
- $props_only
Returns
string An XML fragment with the requested properties for this resource
|
public
string
|
#
RenderAsXML( array $properties, reference & $reply, mixed $bound_parent_path = null )
Render XML for this resource
Render XML for this resource
Parameters
- $properties
array $properties The requested properties for this principal
- $reply
reference $reply A reference to the XMLDocument being used for the reply
- $bound_parent_path
Returns
string An XML fragment with the requested properties for this principal
|