[PHP] Re: referencing an existing object

2004-06-15 Thread Torsten Roehr
> >>I would suggest something like this: > >> > >>class myotherclass { > >> var $db > >> > >> function myotherclass(&$db){ > >> $this->db =& $db; > >> > >> $sql="select * from mytable"; > >> > >> $this->db->dosql($sql); > >> } > >>} > >> > >>$db = new mydbclass()

[PHP] Re: referencing an existing object

2004-06-15 Thread Torsten Roehr
"Justin Patrin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bernie wrote: > > > Howdy, > > I am writing a program that has a handful of classes. I would like > > to be able to get information from one object to the other. I have a > > couple of my classes extending others, b

[PHP] Re: referencing an existing object

2004-06-15 Thread Justin Patrin
Torsten Roehr wrote: "Justin Patrin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Bernie wrote: Howdy, I am writing a program that has a handful of classes. I would like to be able to get information from one object to the other. I have a couple of my classes extending others,

[PHP] Re: referencing an existing object

2004-06-15 Thread Justin Patrin
Bernie wrote: Howdy, I am writing a program that has a handful of classes. I would like to be able to get information from one object to the other. I have a couple of my classes extending others, but are there other ways to do this? For example: If I have a database class and a separate c