title: Custom datasource in CakePHP not working
body: <p>I’m trying to create a custom datasource for Amazon Web Services in CakePHP. My approach is as follows:</p>
  
  <ul>
  <li>Base <code>AwsDataSource</code> that creates signatures, makes the actual HTTP requests etc</li>
  <li>Various datasources for each AWS product (i.e. S3, SQS etc) that extend this class and specifies the endpoint to use</li>
  <li>Models for things like <code>S3Bucket</code>, <code>SqsQueue</code>, <code>SqsMessage</code> and so on</li>
  </ul>
  
  <p>My base datasource class looks like this (simplified):</p>
  
  <pre><code>&lt;?php
  class AwsDataSource extends DataSource {
  
      public $config = array(
          'key' =&gt; '',
          'secret' =&gt; '',
          'region' =&gt; ''
      );
      public $endpoint;
  
      public function signRequest($parameters) {
          // generates signature
      }
  
      public function makeRequest($parameters = array(), $method = 'get') {
          // generates signature and makes HTTP request to AWS servers
      }
  }
  </code></pre>
  
  <p>And a sample model looks like this:</p>
  
  <pre><code>&lt;?php
  class SqsQueue extends AwsAppModel {
  
      public $name = 'SqsQueue';
      public $useTable = false;
  }
  </code></pre>
  
  <p>My problem comes trying to then use these models/datasources in my CakePHP app.</p>
  
  <p>I’ve implemented methods named <code>create()</code>, <code>read()</code>, <code>update()</code> and <code>delete()</code> in my AWS datasource as per <a href="http://book.cakephp.org/2.0/en/models/datasources.html#an-example" rel="nofollow">the CakePHP cookbook</a>, but they don‘t seem to be getting called. I know this because I’ve put <code>die()</code> statements in my datasource with a message, and execution is never stopped.</p>
  
  <p>I’ve exhausted the cookbook, so if any one could show me how to get my models to call the CRUD methods in my datasource classes then I’d be most grateful.</p>