Jackalope\Transport\Jackrabbit\Client::cloneFrom PHP Method

cloneFrom() public method

{@inheritDoc}
public cloneFrom ( $srcWorkspace, $srcAbsPath, $destAbsPath, $removeExisting )
    public function cloneFrom($srcWorkspace, $srcAbsPath, $destAbsPath, $removeExisting)
    {
        $srcAbsPath = $this->encodeAndValidatePathForDavex($srcAbsPath);
        $destAbsPath = $this->encodeAndValidatePathForDavex($destAbsPath);
        // avoid creating a same name sibling as we don't handle them but jackrabbit does
        $this->checkForExistingNode($srcWorkspace, $srcAbsPath, $destAbsPath);
        $body = urlencode(':clone') . '=' . urlencode($srcWorkspace . ',' . $srcAbsPath . ',' . $destAbsPath . ',' . ($removeExisting ? 'true' : 'false'));
        $request = $this->getRequest(Request::POST, $this->workspaceUri);
        $request->setBody($body);
        $request->setContentType('application/x-www-form-urlencoded');
        $request->execute();
    }