public function getAllVersions(OperationContextInterface $context = null)
    {
        $context = $this->ensureContext($context);
        $versions = $this->getBinding()->getVersioningService()->getAllVersions(
            $this->getRepositoryId(),
            $this->getId(),
            $this->getVersionSeriesId(),
            $context->getQueryFilterString(),
            $context->isIncludeAllowableActions()
        );

        $objectFactory = $this->getSession()->getObjectFactory();
        $result = [];
        if (count($versions)) {
            foreach ($versions as $objectData) {
                $document = $objectFactory->convertObject($objectData, $context);
                if (!($document instanceof DocumentInterface)) {
                    throw new CmisVersioningException(
						sprintf(
							'Repository yielded non-Document %s as version of Document %s - unsupported repository response',
							$document->getId(),
							$this->getId()
						)
					);
                }
                $result[] = $document;
            }
        }

        return $result;
    }
public function getAllVersions(OperationContextInterface $context = null)
    {
        $context = $this->ensureContext($context);
        $versions = $this->getBinding()->getVersioningService()->getAllVersions(
            $this->getRepositoryId(),
            $this->getId(),
            $this->getVersionSeriesId(),
            $context->getQueryFilterString(),
            $context->isIncludeAllowableActions()
        );

        $objectFactory = $this->getSession()->getObjectFactory();
        $result = [];
        if (count($versions)) {
            foreach ($versions as $objectData) {
                $document = $objectFactory->convertObject($objectData, $context);
                if (!($document instanceof DocumentInterface)) {
                    throw new CmisVersioningException(
						sprintf(
							'Repository yielded non-Document %s as version of Document %s - unsupported repository response',
							$document->getId(),
							$this->getId()
						)
					);
                }
                $result[] = $document;
            }
        }

        return $result;
    }
public function getAllVersions ( OperationContextInterface $ context = null ) { $ context = $ this -> ensureContext ( $ context ) ; $ versions = $ this -> getBinding ( ) -> getVersioningService ( ) -> getAllVersions ( $ this -> getRepositoryId ( ) , $ this -> getId ( ) , $ this -> getVersionSeriesId ( ) , $ context -> getQueryFilterString ( ) , $ context -> isIncludeAllowableActions ( ) ) ; $ objectFactory = $ this -> getSession ( ) -> getObjectFactory ( ) ; $ result = [ ] ; if ( count ( $ versions ) ) { foreach ( $ versions as $ objectData ) { $ document = $ objectFactory -> convertObject ( $ objectData , $ context ) ; if ( ! ( $ document instanceof DocumentInterface ) ) { throw new CmisVersioningException ( sprintf ( 'Repository yielded non-Document %s as version of Document %s - unsupported repository response' , $ document -> getId ( ) , $ this -> getId ( ) ) ) ; } $ result [ ] = $ document ; } } return $ result ; }
Fetches all versions of this document using the given OperationContext.
The behavior of this method is undefined if the document is not versionable
and can be different for each repository.

@param OperationContextInterface|null $context
@return DocumentInterface[]
Fetches all versions of this document using the given OperationContext . The behavior of this method is undefined if the document is not versionable and can be different for each repository .