Created
September 26, 2017 02:06
-
-
Save buiquangduc/8cd0cd3638afa13075e61484c958fb5b to your computer and use it in GitHub Desktop.
Move unrelated information to another class
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 | |
// Coding Horror | |
interface Employee | |
{ | |
/* The abstraction of all these routines belove is at the Employee level */ | |
public function getEmployee($id); | |
public function removeEmployee($id); | |
public function updateEmployee($id, $data); | |
/* The abstraction of all these routines belove is at Database level */ | |
public function getQueryToCreateEmployee($data); | |
public function getQueryToModifyEmployee($id, $data); | |
public function getQueryToRemoveEmployee($id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment