Created
July 17, 2019 20:00
-
-
Save vahid-almasi/fdf996c151257bb6f0081178903cc752 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Person { | |
public function read(BookInterface $book) | |
{ | |
$book->open(); | |
$book->turnPage(); | |
} | |
} | |
//(new Person)->read(new Book); | |
(new Person)->read(new eReaderAdapter(new Kindle)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment