private function checkContent(Revision $revision)
    {
        $content = $revision->getContent();

        if (null === $content || !($content instanceof AbstractClassContent)) {
            $this->_em->remove($revision);
            throw new ClassContentException('Orphan revision, deleted', ClassContentException::REVISION_ORPHAN);
        }

        if ($revision->getRevision() != $content->getRevision()) {
            throw new ClassContentException('Content is out of date', ClassContentException::REVISION_OUTOFDATE);
        }

        return $content;
    }
private function checkContent(Revision $revision)
    {
        $content = $revision->getContent();

        if (null === $content || !($content instanceof AbstractClassContent)) {
            $this->_em->remove($revision);
            throw new ClassContentException('Orphan revision, deleted', ClassContentException::REVISION_ORPHAN);
        }

        if ($revision->getRevision() != $content->getRevision()) {
            throw new ClassContentException('Content is out of date', ClassContentException::REVISION_OUTOFDATE);
        }

        return $content;
    }
private function checkContent ( Revision $ revision ) { $ content = $ revision -> getContent ( ) ; if ( null === $ content || ! ( $ content instanceof AbstractClassContent ) ) { $ this -> _em -> remove ( $ revision ) ; throw new ClassContentException ( 'Orphan revision, deleted' , ClassContentException :: REVISION_ORPHAN ) ; } if ( $ revision -> getRevision ( ) != $ content -> getRevision ( ) ) { throw new ClassContentException ( 'Content is out of date' , ClassContentException :: REVISION_OUTOFDATE ) ; } return $ content ; }
Checks the content state of a revision.

@param Revision $revision

@return AbstractClassContent  the valid content according to revision state
@throws ClassContentException Occurs when the revision is orphan
Checks the content state of a revision .