Re: [PHP] PHP5 object construct

2006-09-23 Thread Chris Boget
ok, so if we were talking Java, perhaps you are looking for information that allows you to build 'accessor' and 'mutator' methods? If so, then your example should work (syntax aside). Here's another 'test' example that I just whipped up and tested that shows you can use any method name you wish.

Re: Re: [PHP] PHP5 object construct

2006-09-22 Thread Chris Boget
PHP has __set and __get in some versions... I think that's what you are looking for. Yes, but exactly. They'll do if there is no other way (as below)... If you told us which particular feature in that pile of code you're asking about, it would help... the ability to set an accessor like suc

Re: [PHP] PHP5 object construct

2006-09-22 Thread Chris Boget
ok, so if we were talking Java, perhaps you are looking for information that allows you to build 'accessor' and 'mutator' methods? Yes, exactly. I was flipping through a PHP5 book (possibly a magazine, but it was definitely about PHP5 and not Java) and I saw this new language construct. Sinc

Re: Re: [PHP] PHP5 object construct

2006-09-22 Thread Richard Lynch
PHP has __set and __get in some versions... I think that's what you are looking for. If you told us which particular feature in that pile of code you're asking about, it would help... I still wouldn't know the answer, as I don't do OOP in PHP much, but somebody might. On Fri, September 22, 20

Re: Re: Re: [PHP] PHP5 object construct

2006-09-22 Thread Joe Wollard
ok, so if we were talking Java, perhaps you are looking for information that allows you to build 'accessor' and 'mutator' methods? If so, then your example should work (syntax aside). Here's another 'test' example that I just whipped up and tested that shows you can use any method name you wish.

Re: Re: [PHP] PHP5 object construct

2006-09-22 Thread Chris Boget
well, perhaps I'm not seeing what it is that you're looking for. No, I'm not sure you are. Take a look at my sample code again. Pay particular attention to how both $bob and $Bob are defined. class MyClass { private $bob; public $Bob { set( $var ) { $this->bob = $var; } g

Re: [PHP] PHP5 object construct

2006-09-22 Thread Chris Boget
Any particular place on that page I should be looking? I've read it several times and didn't see anything like the above. The closest thing I saw were actual methods called setBob() and getBob(), which isn't exactly what I'm looking for... Check here: http://us2.php.net/manual/en/language.oop5.

Re: [PHP] PHP5 object construct

2006-09-22 Thread Martin Marques
On Fri, 22 Sep 2006 20:15:49 -0400, "Chris Boget" <[EMAIL PROTECTED]> wrote: >> http://us2.php.net/class > > Any particular place on that page I should be looking? I've read it > several > times and didn't see anything like the above. The closest thing I saw > were > actual methods called setBo

Re: Re: [PHP] PHP5 object construct

2006-09-22 Thread Joe Wollard
well, perhaps I'm not seeing what it is that you're looking for. The page I sent you is a basic introduction to classes and OOP in PHP, which based on the example that you've provided seemed like what you wanted. It seems obvious that you want to learn more about OOP, but are you trying to find a

Re: [PHP] PHP5 object construct

2006-09-22 Thread Chris Boget
I read about a feature of PHP5 OOP that is something like this in a book or a magazine a while back. But now I don't remember exactly how this works and I can't find any reference to it in the online docs. The basic idea is something along these lines: class MyClass { private $bob; publ

Re: [PHP] PHP5 object construct

2006-09-22 Thread Joe Wollard
http://us2.php.net/class On 9/22/06, Chris Boget <[EMAIL PROTECTED]> wrote: I read about a feature of PHP5 OOP that is something like this in a book or a magazine a while back. But now I don't remember exactly how this works and I can't find any reference to it in the online docs. The basic