ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAV\IMoveTarget Interface Reference

By implementing this interface, a collection can effectively say "other nodes may be moved into this collection". More...

+ Inheritance diagram for Sabre\DAV\IMoveTarget:
+ Collaboration diagram for Sabre\DAV\IMoveTarget:

Public Member Functions

 moveInto ($targetName, $sourcePath, INode $sourceNode)
 Moves a node into this collection. More...
 
- Public Member Functions inherited from Sabre\DAV\ICollection
 createFile ($name, $data=null)
 Creates a new file in the directory. More...
 
 createDirectory ($name)
 Creates a new subdirectory. More...
 
 getChild ($name)
 Returns a specific child node, referenced by its name. More...
 
 getChildren ()
 Returns an array with all the child nodes. More...
 
 childExists ($name)
 Checks if a child-node with the specified name exists. More...
 
- Public Member Functions inherited from Sabre\DAV\INode
 delete ()
 Deleted the current node. More...
 
 getName ()
 Returns the name of the node. More...
 
 setName ($name)
 Renames the node. More...
 
 getLastModified ()
 Returns the last modification time, as a unix timestamp. More...
 

Detailed Description

By implementing this interface, a collection can effectively say "other nodes may be moved into this collection".

The benefit of this, is that sabre/dav will by default perform a move, by transferring an entire directory tree, copying every collection, and deleting every item.

If a backend supports a better optimized move operation, this can trigger some huge speed gains.

Author
Evert Pot (http://evertpot.com/) http://sabre.io/license/ Modified BSD License

Definition at line 20 of file IMoveTarget.php.

Member Function Documentation

◆ moveInto()

Sabre\DAV\IMoveTarget::moveInto (   $targetName,
  $sourcePath,
INode  $sourceNode 
)

Moves a node into this collection.

It is up to the implementors to:

  1. Create the new resource.
  2. Remove the old resource.
  3. Transfer any properties or other data.

Generally you should make very sure that your collection can easily move the move.

If you don't, just return false, which will trigger sabre/dav to handle the move itself. If you return true from this function, the assumption is that the move was successful.

Parameters
string$targetNameNew local file/collection name.
string$sourcePathFull path to source node
INode$sourceNodeSource node itself
Returns
bool

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