File: D:/HostingSpaces/SBogers10/vangogh.komma.pro/app/Komma/Documents/Kms/DocumentServiceInterface.php
<?php
namespace App\Komma\Documents\Kms;
use App\Komma\Documents\Models\Document;
use App\Komma\Kms\Core\Attributes\Documents;
use App\Komma\Kms\Core\Sections\AbstractAttributeKey;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Collection;
/**
* Class DocumentService
*
* Manages uploads
*
* @package App\Komma\Documents\Kms
*/
interface DocumentServiceInterface
{
/**
* Retrieves the uploaded documents and stores them in the filesystem and database by delegating to other methods
*
* @param Model $model
* @param Documents $attribute
* @param AbstractAttributeKey $beforeSaveKey The key of the attribute before it was saved. If you don't specify it, the attribute key will be used.
* @param AbstractAttributeKey $afterSaveKey The key of the attribute after it was saved. If you don't specify it, the attribute key will be used.
*/
public function processUploadedDocumentsForModel(Model $model, Documents $attribute, AbstractAttributeKey $beforeSaveKey = null, AbstractAttributeKey $afterSaveKey = null);
/**
* Store an html 5 uploaded file
*
* @param UploadedFile $file
* @param string $subFolder the subfolder of the public uploads folder where to store this file
* @param array $imageProperties
* @return Document
*/
public function storeHtml5Upload(UploadedFile $file, string $subFolder, array $imageProperties): Document;
/**
* Deletes all documents for the model given
*
* @param DocumentableInterface|Document $model
*/
public function deleteDocumentsForModel($model);
}