create a class method outside of class
<p>is there a way to create a class method for a class from another class?</p>

<p>Example:</p>

<pre><code>class A
{
    public function makeMethod()
    {
        $this-&gt;b = new B();
        //create a method for class B such as a __call() method
        //to catch an error trying to access a non existant class B method
        if (!method_exists($this-&gt;b, "__call")
            // create __call() method
    }
}

class B
{

}
</code></pre>
