]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/BookExportController.php
Fixed some mis-refactoring and split search service
[bookstack] / app / Http / Controllers / BookExportController.php
index ae3f56b816f5dc4368ec9a4242c6ed03346f2b25..de79d544b8cb9c847d99ae56108f00c092e5afd2 100644 (file)
@@ -2,40 +2,27 @@
 
 namespace BookStack\Http\Controllers;
 
-use BookStack\Entities\ExportService;
+use BookStack\Entities\Tools\ExportFormatter;
 use BookStack\Entities\Repos\BookRepo;
-use BookStack\Exceptions\NotFoundException;
 use Throwable;
 
 class BookExportController extends Controller
 {
-    /**
-     * @var BookRepo
-     */
-    protected $bookRepo;
 
-    /**
-     * @var ExportService
-     */
+    protected $bookRepo;
     protected $exportService;
 
     /**
      * BookExportController constructor.
-     * @param BookRepo $bookRepo
-     * @param ExportService $exportService
      */
-    public function __construct(BookRepo $bookRepo, ExportService $exportService)
+    public function __construct(BookRepo $bookRepo, ExportFormatter $exportService)
     {
         $this->bookRepo = $bookRepo;
         $this->exportService = $exportService;
-        parent::__construct();
     }
 
     /**
      * Export a book as a PDF file.
-     * @param string $bookSlug
-     * @return mixed
-     * @throws NotFoundException
      * @throws Throwable
      */
     public function pdf(string $bookSlug)
@@ -47,9 +34,6 @@ class BookExportController extends Controller
 
     /**
      * Export a book as a contained HTML file.
-     * @param string $bookSlug
-     * @return mixed
-     * @throws NotFoundException
      * @throws Throwable
      */
     public function html(string $bookSlug)
@@ -61,9 +45,6 @@ class BookExportController extends Controller
 
     /**
      * Export a book as a plain text file.
-     * @param $bookSlug
-     * @return mixed
-     * @throws NotFoundException
      */
     public function plainText(string $bookSlug)
     {