PHP code example of quillstack / storage-interface
1. Go to this page and download the library: Download quillstack/storage-interface library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
quillstack / storage-interface example snippets
use Quillstack\StorageInterface\StorageInterface;
final class Invoices
{
public function __construct(private readonly StorageInterface $storage)
{
}
public function keep(string $number, string $pdf): void
{
$this->storage->save("/invoices/{$number}.pdf", $pdf);
}
}
$app = new App(__DIR__ . '/../.env', [
StorageInterface::class => LocalStorage::class,
]);