title: CakePHP: Passing $this->data to the View from Controller
body: <p>I'm using CakePHP 1.2 and I'm just wondering if there is any side affect on passing the $this->data to the View from the Controller.</p>
  
  <p>Ex:</p>
  
  <pre><code>// inside PostsController, I have this code:
  $this-&gt;data['Posts'] = $this-&gt;Post-&gt;find('all');
  </code></pre>
  
  <p>instead of :</p>
  
  <pre><code>$posts = $this-&gt;Post-&gt;find('all');
  $this-&gt;set(compact('posts'));
  
  // inside the /posts/view, I access it like this:
  &lt;?php foreach ($this-&gt;data['Posts'] as $post) {....};?&gt; 
  </code></pre>
  
  <p>By doing this, I skipped the $this->set() from the controller all together. Does this violate any MVC pattern or any security issue that I might have overlook? I saw that using the Auth Component, $this->data contains the [_Token] array.</p>
  
  <p>Thanks</p>