ets / document-storage
Provides implementations to interact with various document storage services
Installs: 2 624
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 28
Forks: 1
Open Issues: 0
Requires
- php: >=5.3.3
- aws/aws-sdk-php: ~2.7
- ets/echosign-bundle: ~0.2
Requires (Dev)
- phpspec/phpspec: ~2.1
- phpunit/phpunit: >=3.7,<5.0
README
Provides implementations to interact with various cloud storage services.
Installation
composer require ets/document-storage
Storage adapters
All storage adapters implement the ETS\DocumentStorage\Storage
interface:
ETS\DocumentStorage\Adapter\Storage\Composite
ETS\DocumentStorage\Adapter\Storage\EchoSign
ETS\DocumentStorage\Adapter\Storage\Filesystem
ETS\DocumentStorage\Adapter\Storage\S3
To store a document:
$docUrl = $storage->store('body of a doc', 'docName');
The method returns the document's url.
To get the document's url
$docUrl = $storage->getUrl('docName');
If the document doesn't exist, it will throw a ETS\DocumentStorage\Exception\DocumentNotFoundException