File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -203,10 +203,13 @@ declare(strict_types=1);
203203namespace Api\Book\Service;
204204
205205use Core\Book\Entity\Book;
206+ use Core\Book\Repository\BookRepository;
206207use Doctrine\ORM\QueryBuilder;
207208
208209interface BookServiceInterface
209210{
211+ public function getBookRepository(): BookRepository;
212+
210213 public function saveBook(array $data): Book;
211214
212215 public function getBooks(array $filters = []): QueryBuilder;
@@ -233,8 +236,14 @@ use Exception;
233236class BookService implements BookServiceInterface
234237{
235238 #[Inject(BookRepository::class)]
236- public function __construct(protected BookRepository $bookRepository)
239+ public function __construct(
240+ protected BookRepository $bookRepository
241+ ) {
242+ }
243+
244+ public function getBookRepository(): BookRepository
237245 {
246+ return $this->bookRepository;
238247 }
239248
240249 /**
You can’t perform that action at this time.
0 commit comments