Beta version

class DocumentFactory

Create documents from UploadedFile.

Factory methods do not flush, only persist in order to use it in loops.

Methods

__construct(File $file, EntityManager $em, EventDispatcherInterface $dispatcher, Packages $packages, Folder $folder = null, LoggerInterface $logger = null)

DocumentFactory constructor.

null|Document
getDocument()

Create a document from UploadedFile, Be careful, this method does not flush, only persists current Document.

updateDocument(Document $document)

Updates a document from UploadedFile, Be careful, this method does not flush.

Details

at line 90
__construct(File $file, EntityManager $em, EventDispatcherInterface $dispatcher, Packages $packages, Folder $folder = null, LoggerInterface $logger = null)

DocumentFactory constructor.

Parameters

File $file
EntityManager $em
EventDispatcherInterface $dispatcher
Packages $packages
Folder $folder
LoggerInterface $logger

at line 131
null|Document getDocument()

Create a document from UploadedFile, Be careful, this method does not flush, only persists current Document.

Return Value

null|Document

at line 186
Document updateDocument(Document $document)

Updates a document from UploadedFile, Be careful, this method does not flush.

Parameters

Document $document

Return Value

Document