[dev] Re: whups: Batch changes on tickets
Auke Bruinsma
air2 at dds.nl
Thu Apr 14 04:22:42 PDT 2005
Jan Schneider wrote:
>>>>All the actions should optionally supplied with the ticket array. If
>>>>none is given, the one given when the Batch class was created should be
>>>>used. If none is given an error should be raised.
>>>>
>>>>
>>>Huh?
>>>
>>>
>>>
>>Like (again ugly example, hopefully make things more clear):
>>Batch ($tickets = null){
>> $_tickets = $tickets;
>>}
>>function Move ($tickets = null)
>>{
>> $usetickets = null;
>> if (count ($tickets)) $usetickets = $tickets;
>> else $usetickets = $_tickets;
>> if (!count ($usetickets)) return error;
>>}
>>
>>
>
>Ah, no, I don't think this is necessary. We should stick to either concept.
>
>
>
Well that disables the use like this:
Batch::Move ($newlocation, $tickets);
and this use:
$obj = new Batch ($tickets);
$obj->Move ($newlocation);
$obj->State ($newstate);
Or is it not right to use this Batch class in both ways.
>>Should the forms gointo this Batch class, or should a seperate class
>>contains the forms and then call the Batch class.
>>The first puts all together at one clear place (which can be a pro)
>>The second seperates the gui from the code (which can be a pro too)
>>
>>
>
>A seperate class, like we do elsewhere in Whups. But you can probably
>put them into one file. Again, look at how we do it with other classes
>in Whups.
>
>Jan.
>
>
>
Ehm why didn't I think of putting 2 classes in one file :S. Of course
thats it. :-)
Auke
More information about the dev
mailing list