On 3/24/10 11:06 AM, Richard Quadling wrote:
On 24 March 2010 15:51, Robert Cummings wrote:
Yes you can do that also, you seemed to want constructors though :) As for
misused... variable parameters with mixed types is common enough that I
wouldn't call it misuse. It's succinct and solves a prob
Peter Lind wrote:
On 24 March 2010 16:48, Robert Cummings wrote:
But now Dalmation_construct1 isn't related Dog_construct1. This seems
problematic from a design perspective unless I'm missing something in your
proposal.
As for abusing class semantics ... I don't see
it. Using separate class
On 24 March 2010 15:51, Robert Cummings wrote:
> Yes you can do that also, you seemed to want constructors though :) As for
> misused... variable parameters with mixed types is common enough that I
> wouldn't call it misuse. It's succinct and solves a problem. Look at the
> printf() family of func
On 24 March 2010 16:48, Robert Cummings wrote:
> Peter Lind wrote:
>
> The ,... is a supported syntax. Then I'd add the appropriate docblock
> for
> the alternate constructors.
It might be but in effect the documentation you're left with is vague
and has double the a
Richard Quadling wrote:
On 24 March 2010 15:27, Robert Cummings wrote:
Are you asking a question? I'm not sure what you want here :) Does the
technique I sent provide you with a solution to this problem or not?
I can certainly see how your suggestion works.
And in my own code, I've often mis
Peter Lind wrote:
The ,... is a supported syntax. Then I'd add the appropriate docblock for
the alternate constructors.
It might be but in effect the documentation you're left with is vague
and has double the amount of documentation lookups, to find out which
parameters you can pass. Using a sep
On 24 March 2010 15:27, Robert Cummings wrote:
> Are you asking a question? I'm not sure what you want here :) Does the
> technique I sent provide you with a solution to this problem or not?
I can certainly see how your suggestion works.
And in my own code, I've often misused a method param list
On 24 March 2010 16:23, Robert Cummings wrote:
> Peter Lind wrote:
>>
>> On 24 March 2010 16:09, Robert Cummings wrote:
>>>
>>> Peter Lind wrote:
On 24 March 2010 15:33, Robert Cummings wrote:
>
> Peter Lind wrote:
>>
>> One of the main points of the OP was that you can
Richard Quadling wrote:
The following code (which cannot currently work as PHP does not allow
for method overloading) would be perfect for me.
__construct(registry::RetrieveViaKey(__CLASS__, $Key));
}
/**
* Constructor : Partial
*
* This constructor wi
Peter Lind wrote:
On 24 March 2010 16:09, Robert Cummings wrote:
Peter Lind wrote:
On 24 March 2010 15:33, Robert Cummings wrote:
Peter Lind wrote:
One of the main points of the OP was that you can document the code
properly. Your example doesn't allow for nice docblocks in any way, as
you
On 24 March 2010 16:09, Robert Cummings wrote:
>
>
> Peter Lind wrote:
>>
>> On 24 March 2010 15:33, Robert Cummings wrote:
>>>
>>> Peter Lind wrote:
One of the main points of the OP was that you can document the code
properly. Your example doesn't allow for nice docblocks in any w
The following code (which cannot currently work as PHP does not allow
for method overloading) would be perfect for me.
__construct(registry::RetrieveViaKey(__CLASS__, $Key));
}
/**
* Constructor : Partial
*
* This constructor will construct the rules fro
Peter Lind wrote:
On 24 March 2010 15:33, Robert Cummings wrote:
Peter Lind wrote:
One of the main points of the OP was that you can document the code
properly. Your example doesn't allow for nice docblocks in any way, as
you'll either have to param points or a whole lot of noise.
I dunno,
On 24 March 2010 15:33, Robert Cummings wrote:
> Peter Lind wrote:
>>
>> One of the main points of the OP was that you can document the code
>> properly. Your example doesn't allow for nice docblocks in any way, as
>> you'll either have to param points or a whole lot of noise.
>
> I dunno, seems h
Peter Lind wrote:
One of the main points of the OP was that you can document the code
properly. Your example doesn't allow for nice docblocks in any way, as
you'll either have to param points or a whole lot of noise.
I dunno, seems highly documentable to me. Each route is handled by it's
own m
Robert Cummings wrote:
Robert Cummings wrote:
Richard Quadling wrote:
Hi.
I have a scenario where I would _like_ to have multiple constructors
for a class.
Each constructor has a greater number of parameters than the previous one.
e.g.
Factory method is probably the cleanest and simplest so
One of the main points of the OP was that you can document the code
properly. Your example doesn't allow for nice docblocks in any way, as
you'll either have to param points or a whole lot of noise.
Quick note: __ prefixed functions are "reserved", you shouldn't use
that prefix for any of your own
Robert Cummings wrote:
Richard Quadling wrote:
Hi.
I have a scenario where I would _like_ to have multiple constructors
for a class.
Each constructor has a greater number of parameters than the previous one.
e.g.
Factory method is probably the cleanest and simplest solution. Just pass
an
On 03/24/2010 05:58 PM, Richard Quadling wrote:
On 24 March 2010 12:08, Nilesh Govindarajan wrote:
On 03/24/2010 05:31 PM, Richard Quadling wrote:
Hi.
I have a scenario where I would _like_ to have multiple constructors
for a class.
Each constructor has a greater number of parameters than t
Richard Quadling wrote:
Hi.
I have a scenario where I would _like_ to have multiple constructors
for a class.
Each constructor has a greater number of parameters than the previous one.
e.g.
Factory method is probably the cleanest and simplest solution. Just pass
an ID as the first paramete
On 24 March 2010 12:39, Peter Lind wrote:
> And how exactly does that differ from building the same pizza in
> different ways? Builder doesn't mean you have to create different
> objects, it means taking the complexity in building a given object or
> set of objects and storing it in one place.
>
>
And how exactly does that differ from building the same pizza in
different ways? Builder doesn't mean you have to create different
objects, it means taking the complexity in building a given object or
set of objects and storing it in one place.
In your case, it allows you to build your object in d
On 24 March 2010 12:06, Peter Lind wrote:
> Hmmm, that looks to me like you're trying to solve a problem in PHP
> with a c/c++c/# overloading solution. I'd give the builder pattern a
> try instead: http://en.wikipedia.org/wiki/Builder_pattern
>
> On 24 March 2010 13:01, Richard Quadling wrote:
>>
On 24 March 2010 12:08, Nilesh Govindarajan wrote:
> On 03/24/2010 05:31 PM, Richard Quadling wrote:
>>
>> Hi.
>>
>> I have a scenario where I would _like_ to have multiple constructors
>> for a class.
>>
>> Each constructor has a greater number of parameters than the previous one.
>>
>> e.g.
>>
>
On 03/24/2010 05:38 PM, Nilesh Govindarajan wrote:
On 03/24/2010 05:31 PM, Richard Quadling wrote:
Hi.
I have a scenario where I would _like_ to have multiple constructors
for a class.
Each constructor has a greater number of parameters than the previous
one.
e.g.
Don't give specify any pa
On 03/24/2010 05:31 PM, Richard Quadling wrote:
Hi.
I have a scenario where I would _like_ to have multiple constructors
for a class.
Each constructor has a greater number of parameters than the previous one.
e.g.
Don't give specify any parameters in the function declaration.
Use helper fu
Hmmm, that looks to me like you're trying to solve a problem in PHP
with a c/c++c/# overloading solution. I'd give the builder pattern a
try instead: http://en.wikipedia.org/wiki/Builder_pattern
On 24 March 2010 13:01, Richard Quadling wrote:
> Hi.
>
> I have a scenario where I would _like_ to ha
Hi.
I have a scenario where I would _like_ to have multiple constructors
for a class.
Each constructor has a greater number of parameters than the previous one.
e.g.
http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Enginee
28 matches
Mail list logo