public function move(
        ObjectIdInterface $sourceFolderId,
        ObjectIdInterface $targetFolderId,
        OperationContextInterface $context = null
    ) {
        $context = $this->ensureContext($context);

        $originalId = $this->getId();
        $newObjectId = $this->getId();

        $this->getBinding()->getObjectService()->moveObject(
            $this->getRepositoryId(),
            $newObjectId,
            $targetFolderId->getId(),
            $sourceFolderId->getId(),
            null
        );

        // invalidate path cache
        $this->getSession()->removeObjectFromCache($this->getSession()->createObjectId($originalId));

        if (empty($newObjectId)) {
            return null;
        }

        $movedObject = $this->getSession()->getObject(
            $this->getSession()->createObjectId((string) $newObjectId),
            $context
        );
        if (!$movedObject instanceof FileableCmisObjectInterface) {
            throw new CmisRuntimeException(
                'Moved object is invalid because it must be of type FileableCmisObjectInterface but is not.'
            );
        }

        return $movedObject;
    }
public function move(
        ObjectIdInterface $sourceFolderId,
        ObjectIdInterface $targetFolderId,
        OperationContextInterface $context = null
    ) {
        $context = $this->ensureContext($context);

        $originalId = $this->getId();
        $newObjectId = $this->getId();

        $this->getBinding()->getObjectService()->moveObject(
            $this->getRepositoryId(),
            $newObjectId,
            $targetFolderId->getId(),
            $sourceFolderId->getId(),
            null
        );

        // invalidate path cache
        $this->getSession()->removeObjectFromCache($this->getSession()->createObjectId($originalId));

        if (empty($newObjectId)) {
            return null;
        }

        $movedObject = $this->getSession()->getObject(
            $this->getSession()->createObjectId((string) $newObjectId),
            $context
        );
        if (!$movedObject instanceof FileableCmisObjectInterface) {
            throw new CmisRuntimeException(
                'Moved object is invalid because it must be of type FileableCmisObjectInterface but is not.'
            );
        }

        return $movedObject;
    }
public function move ( ObjectIdInterface $ sourceFolderId , ObjectIdInterface $ targetFolderId , OperationContextInterface $ context = null ) { $ context = $ this -> ensureContext ( $ context ) ; $ originalId = $ this -> getId ( ) ; $ newObjectId = $ this -> getId ( ) ; $ this -> getBinding ( ) -> getObjectService ( ) -> moveObject ( $ this -> getRepositoryId ( ) , $ newObjectId , $ targetFolderId -> getId ( ) , $ sourceFolderId -> getId ( ) , null ) ; // invalidate path cache $ this -> getSession ( ) -> removeObjectFromCache ( $ this -> getSession ( ) -> createObjectId ( $ originalId ) ) ; if ( empty ( $ newObjectId ) ) { return null ; } $ movedObject = $ this -> getSession ( ) -> getObject ( $ this -> getSession ( ) -> createObjectId ( ( string ) $ newObjectId ) , $ context ) ; if ( ! $ movedObject instanceof FileableCmisObjectInterface ) { throw new CmisRuntimeException ( 'Moved object is invalid because it must be of type FileableCmisObjectInterface but is not.' ) ; } return $ movedObject ; }
Moves this object.

@param ObjectIdInterface $sourceFolderId the object ID of the source folder
@param ObjectIdInterface $targetFolderId the object ID of the target folder
@param OperationContextInterface|null $context the OperationContext to use to fetch the moved object
@return FileableCmisObjectInterface the moved object
@throws CmisRuntimeException Throws exception if the repository returns an invalid object after the object has
been moved
Moves this object .