[nycphp-talk] multiple constructors
Matthew Terenzio
webmaster at localnotion.com
Wed Sep 29 22:09:58 EDT 2004
> Or just use func_get_args()
I see, that will work for me George.
Would you agree that if it is an object or a certain "typed" parameter
you expect, you should explicitly show what the constructor is
expecting. I mean for the sake of a future programmer using the
class.?
I'm going to think about objects all night, instead of getting any
scripting done. : )
On Sep 29, 2004, at 9:53 PM, George Schlossnagle wrote:
>
> On Sep 29, 2004, at 9:51 PM, Matthew Terenzio wrote:
>
>>> Thus, in Java you have multiple constructors because you have to, in
>>> PHP you can't have multiple constructors because you don't ever have
>>> to.
>>
>> So, put the max number of parameters that could be passed in the
>> constructor and just pass arg1, arg2 to the max upon instantiation,
>> depending on the situation?
>
>
>
> George
>
> _______________________________________________
> New York PHP Talk
> Supporting AMP Technology (Apache/MySQL/PHP)
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.newyorkphp.org
More information about the talk
mailing list