assign the whole object for smarty
<p>i'm using smarty as a temeplete engine
and i have one very big class and other classes extended to it and in each sub class i using</p>

<pre><code>function __construct(mainclass &amp;$mainclass) {
$this-&gt;mainclass= &amp; $mainclass;
}
</code></pre>

<p>to use the main class vars in the sub class</p>

<p>and in the end of my code is</p>

<pre><code>$this-&gt;assign( 'mainclass' , $mainclass);
</code></pre>

<p>which assign my db connection and all other things</p>

<p>my question is "is that wrong or true?"</p>
