Using a referenced variable VS a public class variable for custom method call
<p>I have faced a curious condition and maybe you can help me understand that.</p>

<pre><code>$object = array('controller' =&gt; 'frontend_shop', 'method' =&gt; 'category');

include_once(PATH.'controllers/'.$object['controller'].'.php');

$controller = new $object['controller']($object);

class Frontend_shop extends Controller {

   public $controller;

   public function __construct($object)
   {

    // Works
    $this-&gt;$object['method']();

    //Don´t work
    $this-&gt;controller = $object;
    $this-&gt;controller['method']();

    }

   public function category()
   {
       echo 'hello';
   }
}
</code></pre>

<p>This works and 'hello' is displayed</p>

<pre><code>    $this-&gt;$object['method']();
</code></pre>

<p>But when I assign this array to a class variable like:</p>

<pre><code>    $this-&gt;controller = $object;
    $this-&gt;controller['method']();
</code></pre>

<p>I get:</p>

<pre><code>Fatal error: Call to undefined function category() in /usr/lib/app/application/controllers/frontend_shop.php on line 10
</code></pre>

<p>Of course I know that I can use the first method, but maybe you can explain whats could be wrong in the class variable way of do it. Thanks</p>
