Re: [PHP] Class declaration, constants and array

2005-01-28 Thread Bret Hughes
On Fri, 2005-01-28 at 14:50, Marek wrote: > php5 class { > > const _SOMETHING_ = 'test'; > > private $abc=_SOMETHING_; // fails, well actually anything fails > similar to this. > var $test=$test2;// also fails > > So since I can not use dynamic var assignment

Re: [PHP] Class declaration, constants and array

2005-01-28 Thread Jochem Maas
Matthew Fonda wrote: t'isnt good OOP practice to do what you want to do in the first place Im not too hot on 'good practice' - if I understand the code and its neatly laid out then Im happy... but there is no point setting this value here if the value is to be used in an instantiated object (which

Re: [PHP] Class declaration, constants and array

2005-01-28 Thread Richard Lynch
Marek wrote: > php5 class { > > const _SOMETHING_ = 'test'; > > private $abc=_SOMETHING_; // fails, well actually anything fails > similar to this. > var $test=$test2;// also fails > > So since I can not use dynamic var assignment within the class > declaration,

Re: [PHP] Class declaration, constants and array

2005-01-28 Thread Matthew Fonda
t'isnt good OOP practice to do what you want to do in the first place perhaps use the constructor to do it On Fri, 2005-01-28 at 12:50, Marek wrote: > php5 class { > > const _SOMETHING_ = 'test'; > > private $abc=_SOMETHING_; // fails, well actually anything fails > similar to this.