Last active
June 4, 2020 00:58
-
-
Save anvodev/0b1233910a5b5d683fbbac83faced182 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| //coffee_shop_context.php | |
| //to load Class & Interface file when we need them | |
| spl_autoload_register(function ($class_name) { | |
| include $class_name . '.php'; | |
| }); | |
| //at the coffee shop | |
| $egg = new Egg(); | |
| $coffee = new EggCoffee($egg); | |
| $consumer = new AtCoffeeShopConsumer($coffee); | |
| $consumer->readyToWork(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment