1<?php 2 3namespace Sabre\DAV; 4 5/** 6 * By implementing this interface, a collection can effectively say "other 7 * nodes may be moved into this collection". 8 * 9 * The benefit of this, is that sabre/dav will by default perform a move, by 10 * tranfersing an entire directory tree, copying every collection, and deleting 11 * every item. 12 * 13 * If a backend supports a better optimized move operation, this can trigger 14 * some huge speed gains. 15 * 16 * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/). 17 * @author Evert Pot (http://evertpot.com/) 18 * @license http://sabre.io/license/ Modified BSD License 19 */ 20interface IMoveTarget extends ICollection { 21 22 /** 23 * Moves a node into this collection. 24 * 25 * It is up to the implementors to: 26 * 1. Create the new resource. 27 * 2. Remove the old resource. 28 * 3. Transfer any properties or other data. 29 * 30 * Generally you should make very sure that your collection can easily move 31 * the move. 32 * 33 * If you don't, just return false, which will trigger sabre/dav to handle 34 * the move itself. If you return true from this function, the assumption 35 * is that the move was successful. 36 * 37 * @param string $targetName New local file/collection name. 38 * @param string $sourcePath Full path to source node 39 * @param INode $sourceNode Source node itself 40 * @return bool 41 */ 42 function moveInto($targetName, $sourcePath, INode $sourceNode); 43 44} 45