1 | <?php |
||
15 | final class Application implements Library |
||
16 | { |
||
17 | /** {@inheritdoc} */ |
||
18 | public function addBook(UuidInterface $bookId, $title, $authors, $isbn) |
||
22 | |||
23 | /** {@inheritdoc} */ |
||
24 | public function listOfBooks($page = 1, $booksPerPage = null) |
||
28 | |||
29 | /** {@inheritdoc} */ |
||
30 | public function createReservation(UuidInterface $reservationId, UuidInterface $bookId, $email) |
||
31 | { |
||
32 | (new CreateReservation(new LocalReservationRepository()))->create($reservationId, $bookId, $email); |
||
33 | } |
||
34 | |||
35 | /** {@inheritdoc} */ |
||
36 | public function giveAwayBookInReservation(UuidInterface $reservationId, \DateTime $givenAwayAt) |
||
37 | { |
||
38 | (new GiveAwayBookInReservation(new LocalReservationRepository()))->giveAway($reservationId, $givenAwayAt); |
||
39 | } |
||
40 | |||
41 | /** {@inheritdoc} */ |
||
42 | public function giveBackBookFromReservation(UuidInterface $reservationId) |
||
46 | |||
47 | /** {@inheritdoc} */ |
||
48 | public function listReservationsForBook(UuidInterface $bookId) |
||
52 | } |
||
53 |