Object of class A cannot be create directly but only by class B
<pre><code>class A
{
    public function foo()
    {
    }
}

class B
{
    $a = new A;
    public function go()
    {
    }
}
</code></pre>

<p>I want A object cannot be created directly.But only by class B.
How i can do this.</p>
