public function readBookAction(Request $request)
 {
     $bookShelf = new InMemoryBookShelf();
     $bookService = new BookService($bookShelf);
     return $this->render('default/book_content.html.twig', ['content' => $bookService->readBook($request->get('title'), $request->get('page'))]);
 }
Esempio n. 2
0
<?php

require __DIR__ . '/vendor/autoload.php';
use Jkan\BookReader\Application\BookService;
use Jkan\BookReader\Infrastructure\Book\InMemoryBookLibrary;
$library = new InMemoryBookLibrary();
$bookService = new BookService($library);
$title = $argv[1];
$page = $argv[2];
echo $bookService->readBook($title, $page);