1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Finished refactor of entity repos

Removed entity-specific repos and standardised
the majority of repo calls to be applicable to
all entity types
This commit is contained in:
Dan Brown
2017-01-02 11:07:27 +00:00
parent 65796cfc7b
commit 8453191dfb
16 changed files with 756 additions and 950 deletions

View File

@ -3,7 +3,6 @@
use BookStack\Exceptions\FileUploadException;
use BookStack\Attachment;
use BookStack\Repos\EntityRepo;
use BookStack\Repos\PageRepo;
use BookStack\Services\AttachmentService;
use Illuminate\Http\Request;
@ -11,21 +10,18 @@ class AttachmentController extends Controller
{
protected $attachmentService;
protected $attachment;
protected $pageRepo;
protected $entityRepo;
/**
* AttachmentController constructor.
* @param AttachmentService $attachmentService
* @param Attachment $attachment
* @param PageRepo $pageRepo
* @param EntityRepo $entityRepo
*/
public function __construct(AttachmentService $attachmentService, Attachment $attachment, EntityRepo $entityRepo, PageRepo $pageRepo)
public function __construct(AttachmentService $attachmentService, Attachment $attachment, EntityRepo $entityRepo)
{
$this->attachmentService = $attachmentService;
$this->attachment = $attachment;
// TODO - Remove this
$this->pageRepo = $pageRepo;
$this->entityRepo = $entityRepo;
parent::__construct();
}