Get Weather - Step 7 - Adding Abstraction. Pt 1.


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. //creating the so called "abstraction" layer...(????)
  2. class BaseCache{
  3.  
  4. public function BaseCache(){
  5. //some intitialization here...
  6. }
  7.  
  8. public function set($key, $val){
  9.  
  10. }
  11.  
  12. public function get($key){
  13.  
  14. }
  15. }
  16.  
  17.  
  18. class MemCache extends BaseCache{
  19.  
  20.  
  21. }
  22.  
  23. $ooo = new MemCache;
  24. $ooo->set("dd", "ggg");

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.