original_string: public function appendContentStream(StreamInterface $contentStream, $isLastChunk, $refresh = true)
      {
          if ($this->getSession()->getRepositoryInfo()->getCmisVersion()->equals(CmisVersion::CMIS_1_0)) {
              throw new CmisNotSupportedException('This method is not supported for CMIS 1.0 repositories.');
          }
  
          $newObjectId = $this->getId();
          $changeToken = $this->getPropertyValue(PropertyIds::CHANGE_TOKEN);
  
          $this->getBinding()->getObjectService()->appendContentStream(
              $this->getRepositoryId(),
              $newObjectId,
              $this->getObjectFactory()->convertContentStream($contentStream),
              $isLastChunk,
              $changeToken
          );
  
          if ($refresh) {
              $this->refresh();
          }
  
          if ($newObjectId === null) {
              return null;
          }
  
          return $this->getSession()->createObjectId($newObjectId);
      }
code: public function appendContentStream(StreamInterface $contentStream, $isLastChunk, $refresh = true)
      {
          if ($this->getSession()->getRepositoryInfo()->getCmisVersion()->equals(CmisVersion::CMIS_1_0)) {
              throw new CmisNotSupportedException('This method is not supported for CMIS 1.0 repositories.');
          }
  
          $newObjectId = $this->getId();
          $changeToken = $this->getPropertyValue(PropertyIds::CHANGE_TOKEN);
  
          $this->getBinding()->getObjectService()->appendContentStream(
              $this->getRepositoryId(),
              $newObjectId,
              $this->getObjectFactory()->convertContentStream($contentStream),
              $isLastChunk,
              $changeToken
          );
  
          if ($refresh) {
              $this->refresh();
          }
  
          if ($newObjectId === null) {
              return null;
          }
  
          return $this->getSession()->createObjectId($newObjectId);
      }
code_tokens: public function appendContentStream ( StreamInterface $ contentStream , $ isLastChunk , $ refresh = true ) { if ( $ this -> getSession ( ) -> getRepositoryInfo ( ) -> getCmisVersion ( ) -> equals ( CmisVersion :: CMIS_1_0 ) ) { throw new CmisNotSupportedException ( 'This method is not supported for CMIS 1.0 repositories.' ) ; } $ newObjectId = $ this -> getId ( ) ; $ changeToken = $ this -> getPropertyValue ( PropertyIds :: CHANGE_TOKEN ) ; $ this -> getBinding ( ) -> getObjectService ( ) -> appendContentStream ( $ this -> getRepositoryId ( ) , $ newObjectId , $ this -> getObjectFactory ( ) -> convertContentStream ( $ contentStream ) , $ isLastChunk , $ changeToken ) ; if ( $ refresh ) { $ this -> refresh ( ) ; } if ( $ newObjectId === null ) { return null ; } return $ this -> getSession ( ) -> createObjectId ( $ newObjectId ) ; }
docstring: Appends a content stream to the content stream of the document and refreshes this object afterwards.
  If the repository created a new version, this new document is returned.
  Otherwise the current document is returned.
  The stream in contentStream is consumed but not closed by this method.
  
  @param StreamInterface $contentStream the content stream
  @param boolean $isLastChunk indicates if this stream is the last chunk of the content
  @param boolean $refresh if this parameter is set to <code>true</code>, this object will be refreshed after the
  content stream has been appended
  @return ObjectIdInterface|null the updated object ID, or <code>null</code> if the repository did not return
  an object ID
  @throws CmisNotSupportedException
docstring_tokens: Appends a content stream to the content stream of the document and refreshes this object afterwards . If the repository created a new version this new document is returned . Otherwise the current document is returned . The stream in contentStream is consumed but not closed by this method .