Created
March 29, 2017 11:54
-
-
Save mitchellvanw/7e7ada0fa299802b15b39c3601be85b7 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 | |
interface Command {} | |
interface CommandHandler { | |
public function handle(Command $c); | |
} | |
class Register implements Command { | |
public function fullName() { | |
return 'Frank'; | |
} | |
} | |
class HandleRegister implements CommandHandler { | |
public function handle(Register $c) { | |
// do stuff.. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment