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
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
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,
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.
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,
what are some of the easy sol
5 matches
Mail list logo