title: Codeigniter + HMVC + REST
body: <p>I'm working on Codeigniter + HMVC based application and I'm trying to add a new module. I use Phil Sturgeon's <strong>REST_Controller 2.6.0</strong> and <strong>Format</strong> libraries to create an REST API as a module.</p>
  
  <p>When I try to get for example <a href="http://api.example.com/user/id/1/" rel="nofollow">http://api.example.com/user/id/1/</a> or <a href="http://api.example.com/user/id/1/format/json" rel="nofollow">http://api.example.com/user/id/1/format/json</a> I gеt the below error:</p>
  
  <pre><code> A PHP Error was encountered
   Severity: Notice
   Message: Undefined property: Api::$format
   Filename: libraries/REST_Controller.php
   Line Number: 380
  </code></pre>
  
  <p>In my <strong>routes.php</strong> I have this:</p>
  
  <pre><code> $route['user/id/(:num)/format/(:any)'] = "api/user/$1/format/$2";
   $route['user/id/(:num)'] = "api/user/$1";
  </code></pre>
  
  <p>The directory structure of the application is:</p>
  
  <pre><code>application
  --modules
  ----api
  ------config
  ------controller
  </code></pre>
  
  <p>Finlay, I use the default configurations and I didn't change anything. The Format library is auto loaded in <strong>autoload.php</strong>. Any ideas?</p>