public function createDocumentFromSource(
        ObjectIdInterface $source,
        array $properties,
        VersioningState $versioningState,
        array $policies = [],
        array $addAces = [],
        array $removeAces = [],
        OperationContextInterface $context = null
    ) {
        $newObjectId = $this->getSession()->createDocumentFromSource(
            $source,
            $properties,
            $this,
            $versioningState,
            $policies,
            $addAces,
            $removeAces
        );

        $document = $this->getNewlyCreatedObject($newObjectId, $context);

        if ($document === null) {
            return null;
        } elseif (!$document instanceof DocumentInterface) {
            throw new CmisRuntimeException('Newly created object is not a document! New id: ' . $document->getId());
        }

        return $document;
    }
public function createDocumentFromSource(
        ObjectIdInterface $source,
        array $properties,
        VersioningState $versioningState,
        array $policies = [],
        array $addAces = [],
        array $removeAces = [],
        OperationContextInterface $context = null
    ) {
        $newObjectId = $this->getSession()->createDocumentFromSource(
            $source,
            $properties,
            $this,
            $versioningState,
            $policies,
            $addAces,
            $removeAces
        );

        $document = $this->getNewlyCreatedObject($newObjectId, $context);

        if ($document === null) {
            return null;
        } elseif (!$document instanceof DocumentInterface) {
            throw new CmisRuntimeException('Newly created object is not a document! New id: ' . $document->getId());
        }

        return $document;
    }
public function createDocumentFromSource ( ObjectIdInterface $ source , array $ properties , VersioningState $ versioningState , array $ policies = [ ] , array $ addAces = [ ] , array $ removeAces = [ ] , OperationContextInterface $ context = null ) { $ newObjectId = $ this -> getSession ( ) -> createDocumentFromSource ( $ source , $ properties , $ this , $ versioningState , $ policies , $ addAces , $ removeAces ) ; $ document = $ this -> getNewlyCreatedObject ( $ newObjectId , $ context ) ; if ( $ document === null ) { return null ; } elseif ( ! $ document instanceof DocumentInterface ) { throw new CmisRuntimeException ( 'Newly created object is not a document! New id: ' . $ document -> getId ( ) ) ; } return $ document ; }
Creates a new document from a source document in this folder.

@param ObjectIdInterface $source The ID of the source document.
@param array $properties The property values that MUST be applied to the object. The array key is the property
name the value is the property value.
@param VersioningState $versioningState An enumeration specifying what the versioning state of the newly-created
object MUST be. Valid values are:
<code>none</code>
(default, if the object-type is not versionable) The document MUST be created as a non-versionable
document.
<code>checkedout</code>
The document MUST be created in the checked-out state. The checked-out document MAY be
visible to other users.
<code>major</code>
(default, if the object-type is versionable) The document MUST be created as a major version.
<code>minor</code>
The document MUST be created as a minor version.
@param PolicyInterface[] $policies A list of policy ids that MUST be applied to the newly-created document
object.
@param AceInterface[] $addAces A list of ACEs that MUST be added to the newly-created document object, either
using the ACL from folderId if specified, or being applied if no folderId is specified.
@param AceInterface[] $removeAces A list of ACEs that MUST be removed from the newly-created document object,
either using the ACL from folderId if specified, or being ignored if no folderId is specified.
@param OperationContextInterface|null $context
@return DocumentInterface|null the new folder object or <code>null</code> if the parameter <code>context</code>
was set to <code>null</code>
@throws CmisRuntimeException Exception is thrown if the created object is not a document
Creates a new document from a source document in this folder .