|
Posted by NoDude on 09/17/07 13:16
They can't interact, because they'll never be able to see each other.
If you want to accomplish an interaction using your current setup,
you'll have to write methods in the main_class class, which will
delegate information from one object to another.
On Sep 17, 3:13 pm, RageARC <rage...@gmail.com> wrote:
> I have the following code:
>
> index.php:
> class main_class {
>
> public $database = new DAL;
> public $html = new HTML;
>
> }
>
> dal.php:
> class DAL {
>
> function method() {
> # Code
>
> }
> }
>
> class HTML {
>
> function method() {
> # Code
> # HOW TO CALL DAL'S METHOD?
> # Code
>
> }
> }
>
> As you see, DAL and HTML are inside two variables of two classes, but
> how can they interact with each other?
[Back to original message]
|