title: Using PHP interfaces in Codeigniter
body: <p>I am trying to find out how can I used PHP interfaces in my MVC design. I want to make sure that the design enforces an interface so that any new module would follow that.</p>
  
  <p>For example:</p>
  
  <pre><code>&lt;?php
  
  interface BaseAPI {
       public function postMessage($msg);
  }
  
  class ServiceAPI implements BaseAPI {
       public function postMessage($msg) { return $msg; }
  }
  
  class Service_Two_API implements BaseAPI {
       public function postMessage($msg) { return "can't do this: ".$msg; }
  }
  
  ?&gt;
  </code></pre>
  
  <p>I want to do this in CI. Is it possible? how should I design it?</p>