Last active
May 10, 2017 15:02
-
-
Save teddy-hoo/322a6854bffd2ea278dfe9320806ff49 to your computer and use it in GitHub Desktop.
functional programming in php
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 | |
| interface Model { | |
| public function getConnection(); | |
| public function getDb(); | |
| public function getTableName(); | |
| public function getData(); | |
| public function getFileds(); | |
| } | |
| class Order implements Model { | |
| public function getConnection () { | |
| return 'connection'; | |
| } | |
| } | |
| function createRow (Model $model) { | |
| } | |
| function createOrder (Model $order, Callable $createRow) { | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment