Re: [PHP] class attributes and __construct

2010-04-15 Thread Larry Garfield
On Thursday 15 April 2010 08:37:40 am Ashley Sheridan wrote: > I know I could move it to __construct and give it a default value in the > arguments list, but that brings it's own problems. What if the argument > list grows too big, and which attribute would be deemed more important > than another

RE: [PHP] class attributes and __construct

2010-04-15 Thread Tommy Pham
> -Original Message- > From: Fernando [mailto:ferna...@ggtours.ca] > Sent: Thursday, April 15, 2010 10:24 AM > To: php-general@lists.php.net > Subject: Re: [PHP] class attributes and __construct > > Hello Ashely, > > I would initialize the variable when I&#

Re: [PHP] class attributes and __construct

2010-04-15 Thread Fernando
Hello Ashely, I would initialize the variable when I'm defining it as there isn't much of a point of doing it in the constructor unless I'm having the value changed by a parameter. In my opinion: class House { public $roof = true; } is the way to go. Fernando. On 15/04/2010 11:54, Ash

RE: [PHP] class attributes and __construct

2010-04-15 Thread Ashley Sheridan
On Thu, 2010-04-15 at 07:42 -0700, Tommy Pham wrote: > Hi Ashley, > > > -Original Message- > > From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] > > Sent: Thursday, April 15, 2010 6:38 AM > > To: PHP General List > > Subject: [PHP] class attributes and __construct > > > > I think

RE: [PHP] class attributes and __construct

2010-04-15 Thread Tommy Pham
Hi Ashley, > -Original Message- > From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] > Sent: Thursday, April 15, 2010 6:38 AM > To: PHP General List > Subject: [PHP] class attributes and __construct > > I think this is probably going to end up as one of those coders' > preference ty