baruica/document-storage

Provides implementations to interact with various document storage services

0.6.1 2016-05-29 13:02 UTC

README

Provides adapters to various storage services.

Author Build Status Quality Score

Install

Via composer

composer require baruica/document-storage

Storage adapters

All storage adapters implement the DocumentStorage\Storage interface:

  • DocumentStorage\Adapter\Storage\Composite
  • DocumentStorage\Adapter\Storage\Filesystem
  • 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 DocumentStorage\Exception\DocumentNotFound

Code License

LICENSE