Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Introducing DocumentFactory

Compare
Choose a tag to compare
@gulien gulien released this 19 Apr 15:31
· 45 commits to master since this release
20b4bf1

This new release make instantiating documents easier.

There are some breaking changes as described below:

# previously...
$document = new Document('file.pdf');
$document->feedFromPath('/path/to/file');

# ... now:
$document = DocumentFactory::makeFromPath('file.pdf', '/path/to/file');

# previously...
$document = new Document('file.pdf');
$document->feedFromStream(new LazyOpenStream('path/to/file', 'r'));

# ... now:
$document = DocumentFactory::makeFromStream('file.pdf', new LazyOpenStream('path/to/file', 'r'));