Re: [PHP] Accessors

2009-02-19 Thread Thodoris
Also, i know php is an interpreted language. But wouldn't it be possible to write a virtual machine for php and compile byte code... I know, php is not Java or Actionscript :-P but it could be an add on feature. i guess the eval wouldn't work then would it? Although eval could still be interpret

Re: [PHP] Accessors

2009-02-19 Thread Shawn McKenzie
> Also, i know php is an interpreted language. But wouldn't it be possible to > write a virtual machine for php and compile byte code... I know, php is not > Java or Actionscript :-P but it could be an add on feature. i guess the eval > wouldn't work then would it? Although eval could still be inte

Re: [PHP] Accessors

2009-02-19 Thread Philip Thompson
On Feb 19, 2009, at 10:55 AM, Jochem Maas wrote: please keep replies on list. Sorry! Philip Thompson schreef: On Feb 19, 2009, at 2:59 AM, Jochem Maas wrote: Philip Thompson schreef: Hi all. What are your thoughts? Does this seem like a reasonable implementation? Useful? Poin

Re: [PHP] Accessors

2009-02-19 Thread Jochem Maas
please keep replies on list. Philip Thompson schreef: > On Feb 19, 2009, at 2:59 AM, Jochem Maas wrote: > >> Philip Thompson schreef: >>> Hi all. >> >> >> >>> >>> What are your thoughts? Does this seem like a reasonable implementation? >>> Useful? Pointless? Hit me up - I can handle *constru

Re: [PHP] Accessors

2009-02-19 Thread German Geek
It's not a bad idea but usually having accessor and mutator methods are used to validate the data first before writing it to the properties. If you don't have validation, you might as well set them directly and make them public and don't really need a generic setter/getter method. Although, this w

Re: [PHP] Accessors

2009-02-19 Thread Jochem Maas
Philip Thompson schreef: > Hi all. > > What are your thoughts? Does this seem like a reasonable implementation? > Useful? Pointless? Hit me up - I can handle *constructive* criticism. > But for now, it's late and past my bedtime. how do you set a property to null? > Cheers, > ~Philip > >