daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. interface DataMapperInterface
  2.     {
  3.             public function find($params);
  4.             public function save($object);
  5.             public function delete($object);
  6.     }
  7.  
  8.     class DataMapper_User implements DataMapperInterface
  9.     {                              
  10.             public function find($params)
  11.             {                      
  12.                     //Execute code to retrieve data from data source
  13.                     return someDataRetrievalMethod($params);
  14.             }
  15.  
  16.             public function save($object)
  17.             {
  18.                     throw new Exception('Method not yet implemented.');
  19.             }
  20.  
  21.             public function delete($object)
  22.             {
  23.                     throw new Exception('Method not yet implemented.');
  24.             }
  25.     }
  26.    
  27. interface DataMapperInterface
  28.     {
  29.             public function find($params);
  30.             public function save($object);
  31.             public function delete($object);
  32.     }
  33.  
  34.     abstract class DataMapper_User implements DataMapperInterface
  35.     {                              
  36.             public function find($params)
  37.             {                      
  38.                     //Execute code to retrieve data from data source
  39.                     return someDataRetrievalMethod($params);
  40.             }
  41.  
  42.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top