Guest User

Untitled

a guest
Sep 26th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Controller;
  4.  
  5. /**
  6. * Description of Client
  7. */
  8. class Client {
  9.  
  10. public function action()
  11. {
  12. //get the Book from Doctrine
  13. // ...
  14. $book = new \Entity\Book();
  15. $book->setContent("#Hello world\n ## this line should not be read at the first time");
  16. //
  17.  
  18. $visitor = new \Reader\BookVisitor();
  19. $visitor->visit($book);
  20.  
  21. //Here we go
  22. echo $visitor->read();
  23. }
  24. }
Add Comment
Please, Sign In to add comment