Member Function Documentation

Acquire lock for the complete tree for read or write operations. This does not implement any priorities for operations, or check if several read operation may run in parallel. The plain locking should / could be extended by something more sophisticated.

If the tree already has been locked, the method waits until the lock can be acquired.

The optional second parameter $readOnly indicates wheather a read only lock should be acquired. This may be used by extended implementations, but it is not used in this implementation.

Recursively copy a file or directory in $source to the given $destination. If a $depth is given, the operation will stop as soon as the given recursion depth is reached. A depth of -1 means no limit, while a depth of 0 means, that only the current file or directory will be copied, without any recursion.

Returns an empty array if no errors occured, and an array with the files which caused errors otherwise.

An entry in the the returned array is of this form: array( 'name' => node name (eg. 'Group picture'), 'size' => storage size of the_node in bytes (eg. 57123), 'mimetype' => mime type of the node (eg. 'image/jpeg'), 'ctime' => creation time as timestamp, 'mtime' => latest modification time as timestamp, 'href' => the path to the node (eg. '/plain_site_user/Content/Folder1/file1.jpg')

List of other nodes belonging to the target node (one level below it) will be returned as well.

An entry in the the returned array is of this form: array( 'name' => node name (eg. 'Content'), 'size' => storage size of the_node in bytes (eg. 4096 for collections), 'mimetype' => mime type of the node (eg. 'httpd/unix-directory'), 'ctime' => creation time as timestamp, 'mtime' => latest modification time as timestamp, 'href' => the path to the node (eg. '/plain_site_user/Content/')

An entry in the the returned array is of this form: array( 'name' => node name (eg. 'plain_site_user'), 'size' => storage size of the_node in bytes (eg. 4096 for collections), 'mimetype' => mime type of the node (eg. 'httpd/unix-directory'), 'ctime' => creation time as timestamp, 'mtime' => latest modification time as timestamp, 'href' => the path to the node (eg. '/plain_site_user/')

Builds and returns the content of the virtual start folder for a site.

The virtual startfolder is an intermediate step between the site-list and actual content. This directory contains the "content" folder which leads to the site's actual content.

An entry in the the returned array is of this form: array( 'name' => node name (eg. 'Group picture'), 'size' => storage size of the_node in bytes (eg. 57123), 'mimetype' => mime type of the node (eg. 'image/jpeg'), 'ctime' => creation time as timestamp, 'mtime' => latest modification time as timestamp, 'href' => the path to the node (eg. '/plain_site_user/Content/Folder1/file1.jpg')

Returns an array with the members of the collection identified by $path. The returned array can contain ezcWebdavCollection, and ezcWebdavResource instances and might also be empty, if the collection has no members.

Depending on the virtual folder we will generate a node path url and fetch the nodes for that path.

An entry in the the returned array is of this form: array( 'name' => node name (eg. 'Folder1'), 'size' => storage size of the_node in bytes (eg. 4096 for collections), 'mimetype' => mime type of the node (eg. 'httpd/unix-directory'), 'ctime' => creation time as timestamp, 'mtime' => latest modification time as timestamp, 'href' => the path to the node (eg. '/plain_site_user/Content/Folder1/')

Get all nodes from the resource identified by $source 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

string

$source

int

$depth

Returns

array(ezcWebdavResource|ezcWebdavCollection)

eZWebDAVContentBackend::getProperty

(

$path,

$propertyName,

$namespace = 'DAV:'

)

Returns a property of a resource.

Returns the property with the given $propertyName, from the resource identified by $path. You may optionally define a $namespace to receive the property from.

This method returns the content of the resource identified by $path as a string.

Parameters

string

$target

Returns

string

eZWebDAVContentBackend::getVirtualFolderCollection

(

$currentSite,

$collection,

$fullPath,

$depth,

$properties

)

protected

Handles collections on the virtual folder level, if no virtual folder elements are accessed it lists the virtual folders.

An entry in the the returned array is of this form: array( 'name' => node name (eg. 'Group picture'), 'size' => storage size of the_node in bytes (eg. 57123), 'mimetype' => mime type of the node (eg. 'image/jpeg'), 'ctime' => creation time as timestamp, 'mtime' => latest modification time as timestamp, 'href' => the path to the node (eg. '/plain_site_user/Content/Folder1/file1.jpg')

Tries to lock the backend. If the lock is already owned by this process, locking is successful. If $timeout is reached before a lock could be acquired, an ezcWebdavLockTimeoutException is thrown. Waits $waitTime microseconds between attempts to lock the backend.

Recursively move a file or directory in $source to the given $destination. If a $depth is given, the operation will stop as soon as the given recursion depth is reached. A depth of -1 means no limit, while a depth of 0 means, that only the current file or directory will be copied, without any recursion.

Returns an empty array if no errors occured, and an array with the files which caused errors otherwise.

Deletes the resource identified by $path recursively. Returns an instance of ezcWebdavErrorResponse if the deletion failed, and null on success.

In case performDelete() was called from a MOVE operation, it does not delete anything, because the move() function in ezcWebdavSimpleBackend first calls performDelete(), which deletes the destination if the source and destination are the same in URL alias terms.

The ezcWebdavPropFindRequest object contains a definition to find one or more properties of a given collection or non-collection resource.

This method acquires the internal lock of the backend, dispatches to ezcWebdavSimpleBackend to perform the operation and releases the lock afterwards.

This method is an overwrite of the propFind method from ezcWebdavSimpleBackend, a hack necessary to permit correct output of eZ Publish nodes. The array of ezcWebdavPropFindResponse objects returned by ezcWebdavSimpleBackend::propFind is iterated and the paths of the nodes in the ezcWebdavPropFindResponse objects are encoded properly, in order to be displayed correctly in WebDAV clients. The encoding is from the ini setting Charset in [CharacterSettings] in i18n.ini.