Hello,
here is my problem :
I have a class A and I instanciate this class at the beginninf of my script.
I have another class B and in some functions of this class B, I need to
access the instance of the class A.

So in the functions of the class B, to access the class A, is it better to
receive a reference of the class A in the contructor of the class B and then
store the reference into a variable of the class B
OR
is it better to declare global $foo; at the beginning of the functions of
the class B where I need to access the instance of the class A
($foo is the name of the instance of my class A)

???

Thanks a lot



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to