v7.0.0-beta.2 release
This commit is contained in:
1 parent
6595fd0eb5
commit
fa8eba7a0d
1165 files changed
+107118
-762127
No files matched your search
+27
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Plugins\Sirsoft\Ckeditor5\Repositories\Contracts;
|
||||
|
||||
use Plugins\Sirsoft\Ckeditor5\Models\Ckeditor5ImageUpload;
|
||||
|
||||
/**
|
||||
* CKEditor5 이미지 업로드 Repository 인터페이스
|
||||
*/
|
||||
interface ImageUploadRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* 해시로 이미지 조회
|
||||
*
|
||||
* @param string $hash 이미지 해시 (12자)
|
||||
* @return Ckeditor5ImageUpload|null
|
||||
*/
|
||||
public function findByHash(string $hash): ?Ckeditor5ImageUpload;
|
||||
|
||||
/**
|
||||
* 이미지 기록 생성
|
||||
*
|
||||
* @param array $data 이미지 데이터
|
||||
* @return Ckeditor5ImageUpload
|
||||
*/
|
||||
public function create(array $data): Ckeditor5ImageUpload;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Plugins\Sirsoft\Ckeditor5\Repositories;
|
||||
|
||||
use Plugins\Sirsoft\Ckeditor5\Models\Ckeditor5ImageUpload;
|
||||
use Plugins\Sirsoft\Ckeditor5\Repositories\Contracts\ImageUploadRepositoryInterface;
|
||||
|
||||
/**
|
||||
* CKEditor5 이미지 업로드 Repository 구현체
|
||||
*/
|
||||
class ImageUploadRepository implements ImageUploadRepositoryInterface
|
||||
{
|
||||
public function __construct(
|
||||
protected Ckeditor5ImageUpload $model
|
||||
) {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function findByHash(string $hash): ?Ckeditor5ImageUpload
|
||||
{
|
||||
return $this->model->where('hash', $hash)->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function create(array $data): Ckeditor5ImageUpload
|
||||
{
|
||||
return $this->model->create($data);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user