Re: [PHP] Can a class instance a property of another class

2007-02-02 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
Thanks to all -- got all of this working fine. Mostly my syntax was a bit off. Your examples helped me mend my ways. Ken -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can a class instance a property of another class

2007-01-30 Thread Jochem Maas
Richard Lynch wrote: > On Sat, January 27, 2007 7:00 pm, Jochem Maas wrote: >> objects are always by reference in php5 - in php4 you have to >> use the 'reference' operator (the @ symbol) to make object be passed >> by reference. > > [pedantic for="archives"] > Not the @ symbol, which suppresses e

Re: [PHP] Can a class instance a property of another class

2007-01-29 Thread Richard Lynch
On Sat, January 27, 2007 7:00 pm, Jochem Maas wrote: > objects are always by reference in php5 - in php4 you have to > use the 'reference' operator (the @ symbol) to make object be passed > by reference. [pedantic for="archives"] Not the @ symbol, which suppresses errors, but the & symbol which fo

Re: [PHP] Can a class instance a property of another class

2007-01-27 Thread Jochem Maas
Ken Kixmoeller -- reply to [EMAIL PROTECTED] wrote: > OK, Jochem, I adapted your example and got it working. Thank you very much. > > I am still playing with it to better understand. One thing I don't yet > understand is the necessity for the getFoo()/getBar() "handshake," > especially the getbar(

Re: [PHP] Can a class instance a property of another class

2007-01-27 Thread Myron Turner
Ken Kixmoeller -- reply to [EMAIL PROTECTED] wrote: OK, Jochem, I adapted your example and got it working. Thank you very much. I am still playing with it to better understand. One thing I don't yet understand is the necessity for the getFoo()/getBar() "handshake," especially the getbar() in

Re: [PHP] Can a class instance a property of another class

2007-01-27 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
OK, Jochem, I adapted your example and got it working. Thank you very much. I am still playing with it to better understand. One thing I don't yet understand is the necessity for the getFoo()/getBar() "handshake," especially the getbar() in the BAR class. That doesn't seem to serve any pu

Re: [PHP] Can a class instance a property of another class

2007-01-27 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
Thanks for your help, guys. I had to leave my office last evening before I had a chance to try any of them. I am sneaking in some office time today. I'll let you know (with complete scripts and error messages). Ken -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: ht

Re: [PHP] Can a class instance a property of another class

2007-01-27 Thread Jochem Maas
Edward Kay wrote: > >> Hey - -- - >> >> Here I am again. Anybody still working on a Friday? >> >> I would like to have a class instance be the property of another >> class, like can be done in other languages. For example: I would like >> to have a "Connections" class which contains all of the da

Re: [PHP] Can a class instance a property of another class

2007-01-27 Thread Edward Kay
Hey - -- - Here I am again. Anybody still working on a Friday? I would like to have a class instance be the property of another class, like can be done in other languages. For example: I would like to have a "Connections" class which contains all of the database connection logic and query

Re: [PHP] Can a class instance a property of another class

2007-01-26 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-26 17:18:37 -0600: > So, in the __construct method of a business or data class, for > example, one could: > > include_once("connection_classes.kbk"); > $this->connection_class = new connection_class; > > This syntax fails, so I know this isn't right, but I hope you

Re: [PHP] Can a class instance a property of another class

2007-01-26 Thread Jochem Maas
Ken Kixmoeller -- reply to [EMAIL PROTECTED] wrote: > Hey - -- - > > Here I am again. Anybody still working on a Friday? > > I would like to have a class instance be the property of another class, > like can be done in other languages. For example: I would like to have a > "Connections" class wh

RE: [PHP] Can a class instance a property of another class

2007-01-26 Thread Jay Blanchard
[snip] This syntax fails, so I know this isn't right, but I hope you get the idea. Can it be done? [/snip] Extends? class new_connection extends connection {} [/snip again] I read too fast A member function can be referenced by another class as long as the function is public. You would j

RE: [PHP] Can a class instance a property of another class

2007-01-26 Thread Jay Blanchard
[snip] I would like to have a class instance be the property of another class, like can be done in other languages. For example: I would like to have a "Connections" class which contains all of the database connection logic and query results. There are advantages to having this type of util

[PHP] Can a class instance a property of another class

2007-01-26 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
Hey - -- - Here I am again. Anybody still working on a Friday? I would like to have a class instance be the property of another class, like can be done in other languages. For example: I would like to have a "Connections" class which contains all of the database connection logic and query