title: Cakephp 2.x: how to paginate data from an existing array (json, etc)?
body: <p>I use a remote API to retrieve data (in xml, json format), which I'm caching.
  But I need to properly paginate this data before render.</p>
  
  <p>I don't want to store this data in database.</p>
  
  <p>I'm OK to recreate a PHPPaginator component and do the data manipulation by myself (Hash::sort, filtering, etc) <a href="https://stackoverflow.com/questions/8909141/cakephp-paginating-sorting-filtering-data-from-cached-tables">like mentioned here</a> but I would love to reuse the Pagination helper.</p>
  
  <p>I tried to understand how the Paginator component transmits data to the Paginator helper but I couldn't find where it was instantiated and where the data was set.</p>
  
  <p>I saw the $this->Paginator->settings gives for a classic model:</p>
  
  <pre><code>array(
  'page' =&gt; (int) 1,
  'current' =&gt; (int) 100,
  'count' =&gt; (int) 341,
  'prevPage' =&gt; false,
  'nextPage' =&gt; true,
  'pageCount' =&gt; (int) 4,
  'order' =&gt; 'Model.created DESC',
  'limit' =&gt; (int) 100,
  'options' =&gt; array(),
  'paramType' =&gt; 'named'
  )
  </code></pre>
  
  <p>How should I instantiate the Paginator helper for it to autobuild all the links in the very same way as it does with normal data?</p>