Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface DataMapperInterface
- {
- public function find($params);
- public function save($object);
- public function delete($object);
- }
- class DataMapper_User implements DataMapperInterface
- {
- public function find($params)
- {
- //Execute code to retrieve data from data source
- return someDataRetrievalMethod($params);
- }
- public function save($object)
- {
- throw new Exception('Method not yet implemented.');
- }
- public function delete($object)
- {
- throw new Exception('Method not yet implemented.');
- }
- }
- interface DataMapperInterface
- {
- public function find($params);
- public function save($object);
- public function delete($object);
- }
- abstract class DataMapper_User implements DataMapperInterface
- {
- public function find($params)
- {
- //Execute code to retrieve data from data source
- return someDataRetrievalMethod($params);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement