Webdav: ezcWebdavSimpleBackend
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcWebdavSimpleBackend
|
This backend provides the generic handling of requests and dispatches the requuired actions to some basic manipulation methods, which you are required to implement. [
source]
Implemented Interfaces
This backend does not provide support for extended Webdav features, like compression, or locking handled by the backend, therefore the getFeatures() method is final. If you want to develop a backend which is capable of manual handling those features directly extend from
ezcWebdavBackend.
Parents
ezcWebdavBackend
|
--ezcWebdavSimpleBackend
Inherited Constants
From
ezcWebdavBackend:
Method Summary
|
public ezcWebdavResponse |
copy(
$request )
Required method to serve COPY requests. |
|
protected abstract void |
createCollection(
$path )
Create a new collection. |
|
protected abstract void |
createResource(
$path, [$content = null] )
Create a new resource. |
|
public ezcWebdavResponse |
delete(
$request )
Required method to serve DELETE requests. |
|
protected ezcWebdavResponse |
fetchAllProperties(
$request )
Fetch all available properties for a node. |
|
protected ezcWebdavResponse |
fetchProperties(
$request )
Fetch properties by name as defined in propfind prop request. |
|
protected ezcWebdavResponse |
fetchPropertyNames(
$request )
Fetch names of all available properties for a node. |
|
public ezcWebdavResponse |
get(
$request )
Required method to serve GET requests. |
|
public abstract ezcWebdavPropertyStorage |
getAllProperties(
$resource )
Manually get a property on a resource. |
|
protected abstract array |
getCollectionMembers(
$path )
Get members of collection. |
|
public int |
getFeatures(
)
Return bitmap of additional features supported by the backend referenced by constants from the basic ezcWebdavBackend class. |
|
protected array |
getNodes(
$source, $depth )
Get all children nodes. |
|
public abstract ezcWebdavProperty |
getProperty(
$resource, $propertyName, [$namespace = 'DAV:'] )
Manually get a property on a resource. |
|
protected abstract string |
getResourceContents(
$path )
Get contents of a resource. |
|
public ezcWebdavResponse |
head(
$request )
Required method to serve HEAD requests. |
|
protected abstract bool |
isCollection(
$path )
Check if node is a collection. |
|
public ezcWebdavResponse |
makeCollection(
$request )
Required method to serve MKCOL (make collection) requests. |
|
public ezcWebdavResponse |
move(
$request )
Required method to serve MOVE requests. |
|
protected abstract bool |
nodeExists(
$path )
Check if node exists. |
|
protected abstract array(ezcWebdavErrorResponse) |
performCopy(
$fromPath, $toPath, [$depth = ezcWebdavRequest::DEPTH_INFINITY] )
Copy resources recursively from one path to another. |
|
protected abstract ezcWebdavErrorResponse |
performDelete(
$path )
Delete everything below this path. |
|
public ezcWebdavResponse |
propFind(
$request )
Required method to serve PROPFIND requests. |
|
public ezcWebdavResponse |
propPatch(
$request )
Required method to serve PROPPATCH requests. |
|
public ezcWebdavResponse |
put(
$request )
Required method to serve PUT requests. |
|
public abstract bool |
removeProperty(
$resource, $property )
Manually remove a property from a resource. |
|
public abstract bool |
resetProperties(
$resource, $properties )
Reset property storage for a resource. |
|
public abstract bool |
setProperty(
$resource, $property )
Manually set a property on a resource to request it later. |
|
protected abstract void |
setResourceContents(
$path, $content )
Set contents of a resource. |
Inherited Methods
From
ezcWebdavBackend :
Methods
copy
Required method to serve COPY requests.
The method receives a ezcWebdavCopyRequest objects containing all relevant information obout the clients request and should either return an error by returning an ezcWebdavErrorResponse object, or any other ezcWebdavResponse objects.
Parameters
createCollection
void createCollection(
string
$path )
Create a new collection.
Creates a new collection at the given path.
Parameters
| Name |
Type |
Description |
$path |
string |
|
createResource
void createResource(
string
$path, [string
$content = null] )
Create a new resource.
Creates a new resource at the given path, optionally with the given content.
Parameters
| Name |
Type |
Description |
$path |
string |
|
$content |
string |
|
delete
Required method to serve DELETE requests.
The method receives a ezcWebdavDeleteRequest objects containing all relevant information obout the clients request and should either return an error by returning an ezcWebdavErrorResponse object, or any other ezcWebdavResponse objects.
Parameters
fetchAllProperties
Fetch all available properties for a node.
Fetch properties in one node, and if the node is a collection, also return children, depending on the set depth header.
Parameters
fetchProperties
Fetch properties by name as defined in propfind prop request.
Fetch properties as defined by the passed propfind request by their names for the given node.
Parameters
fetchPropertyNames
Fetch names of all available properties for a node.
Fetch names of properties in one node, and if the node is a collection, also return children, depending on the set depth header.
Parameters
get
Required method to serve GET requests.
Parameters
Redefinition of
getAllProperties
Manually get a property on a resource.
Parameters
| Name |
Type |
Description |
$resource |
string |
|
getCollectionMembers
array getCollectionMembers(
string
$path )
Get members of collection.
Returns an array with the members of the collection given by the path of the collection.
The returned array holds elements which are either ezcWebdavCollection, or ezcWebdavResource.
Parameters
| Name |
Type |
Description |
$path |
string |
|
getFeatures
int getFeatures(
)
Return bitmap of additional features supported by the backend referenced by constants from the basic ezcWebdavBackend class.
Redefinition of
| Method |
Description |
ezcWebdavBackend::getFeatures() |
Return bitmap of additional features supported by the backend referenced by constants from the basic ezcWebdavBackend class. |
getNodes
array getNodes(
string
$source, int
$depth )
Get all children nodes.
Get all nodes from given $source path up to the given depth. Reuses the method
getCollectionMembers, but you may want to overwrite this implementation by somethings which fits better with your backend.
Parameters
| Name |
Type |
Description |
$source |
string |
|
$depth |
int |
|
getProperty
ezcWebdavProperty getProperty(
string
$resource, string
$propertyName, [string
$namespace = 'DAV:'] )
Manually get a property on a resource.
Get the property with the given name from the given resource. You may optionally define a namespace to receive the property from.
Parameters
| Name |
Type |
Description |
$resource |
string |
|
$propertyName |
string |
|
$namespace |
string |
|
getResourceContents
string getResourceContents(
string
$path )
Get contents of a resource.
Parameters
| Name |
Type |
Description |
$path |
string |
|
head
Required method to serve HEAD requests.
Parameters
Redefinition of
isCollection
bool isCollection(
string
$path )
Check if node is a collection.
Check if the node behind the given path is a collection.
Parameters
| Name |
Type |
Description |
$path |
string |
|
makeCollection
Required method to serve MKCOL (make collection) requests.
The method receives a ezcWebdavMakeCollectionRequest objects containing all relevant information obout the clients request and should either return an error by returning an ezcWebdavErrorResponse object, or any other ezcWebdavResponse objects.
Parameters
move
Required method to serve MOVE requests.
The method receives a ezcWebdavMoveRequest objects containing all relevant information obout the clients request and should either return an error by returning an ezcWebdavErrorResponse object, or any other ezcWebdavResponse objects.
Parameters
nodeExists
bool nodeExists(
string
$path )
Check if node exists.
Check if a node exists with the given path.
Parameters
| Name |
Type |
Description |
$path |
string |
|
performCopy
array(ezcWebdavErrorResponse) performCopy(
string
$fromPath, string
$toPath, [int
$depth = ezcWebdavRequest::DEPTH_INFINITY] )
Copy resources recursively from one path to another.
Returns an array with
ezcWebdavErrorResponses for all subtree, where the copy operation failed. Errors subsequent nodes in a subtree should be ommitted.
If an empty array is return, the operation has been completed successfully.
Parameters
| Name |
Type |
Description |
$fromPath |
string |
|
$toPath |
string |
|
$depth |
int |
|
performDelete
Delete everything below this path.
Returns an error response if the deletion failed, and null on success.
Parameters
| Name |
Type |
Description |
$path |
string |
|
propFind
Required method to serve PROPFIND requests.
Parameters
Redefinition of
propPatch
Required method to serve PROPPATCH requests.
Parameters
Redefinition of
put
Required method to serve PUT requests.
The method receives a ezcWebdavPutRequest objects containing all relevant information obout the clients request and should either return an error by returning an ezcWebdavErrorResponse object, or any other ezcWebdavResponse objects.
Parameters
removeProperty
Manually remove a property from a resource.
Parameters
resetProperties
Reset property storage for a resource.
Parameters
setProperty
Manually set a property on a resource to request it later.
Parameters
setResourceContents
void setResourceContents(
string
$path, string
$content )
Set contents of a resource.
Change the contents of the given resource to the given content.
Parameters
| Name |
Type |
Description |
$path |
string |
|
$content |
string |
|
Last updated: Mon, 12 Nov 2007