title: How to correctly pass data from controller to view?
body: <p>My current implementation:</p>
  
  <pre><code>class SomeController extends AppController
  {
      function someaction()
      {   
          $d['text'] = "ahoy!";
          $this-&gt;render("someactionView", $d);
      }
  }
  </code></pre>
  
  <p>And in <code>AppController</code>:</p>
  
  <pre><code>function render($file, $data = "")
  {
      require "views/" . $file . ".php";
  }
  </code></pre>
  
  <p>And the <code>$data</code> will be available in the views file. Is this a <em>correct</em> implementation? Are there any fallacies with this implementation?</p>