Re: [PHPTAL] Re: Feature request: Allow array as parameter of PHPTAL's set() method

2010-11-22 Thread Anton Andriyevskyy
Kornel, +1 about error detection. Makes sense in case of PHP language! Anton Andriyevskyy Expert in Business Automation & Web Development 2010/11/22 Kornel Lesiński > On 22 Nov 2010, at 14:58, Tjerk Meesters wrote: > > > > My bad, I did read from the beginning but I think certain parts ended

Re: [PHPTAL] Re: Feature request: Allow array as parameter of PHPTAL's set() method

2010-11-22 Thread Anton Andriyevskyy
As for me, methods overloading is good only with explicitly typed languages. Otherwise it's just potential for bugs and problems even in work of experienced problem. Anton Andriyevskyy Expert in Business Automation & Web Development On Mon, Nov 22, 2010 at 4:58 PM, Tjerk Meesters wrote: > Hi,

Re: [PHPTAL] Re: Feature request: Allow array as parameter of PHPTAL's set() method

2010-11-22 Thread Kornel Lesiński
On 22 Nov 2010, at 14:58, Tjerk Meesters wrote: > > My bad, I did read from the beginning but I think certain parts ended in a > void ;) > > Still, in my opinion any function that takes name/value pairs is a candidate > for array overloading. I sometimes wished php would do java'ish method > o

Re: [PHPTAL] Re: Feature request: Allow array as parameter of PHPTAL's set() method

2010-11-22 Thread Tjerk Meesters
Hi, My bad, I did read from the beginning but I think certain parts ended in a void ;) Still, in my opinion any function that takes name/value pairs is a candidate for array overloading. I sometimes wished php would do java'ish method overloading ... is there another reason beyond the one-up comp

Re: [PHPTAL] Re: Feature request: Allow array as parameter of PHPTAL's set() method

2010-11-22 Thread Anton Andriyevskyy
This idea was discussed already, please read thread from beginning. Kornel just proposed to not overload it. Anton Andriyevskyy Expert in Business Automation & Web Development On Mon, Nov 22, 2010 at 2:44 PM, Tjerk Meesters wrote: > Alternatively you could allow overloading set() to accept an

Re: [PHPTAL] Re: Feature request: Allow array as parameter of PHPTAL's set() method

2010-11-22 Thread Tjerk Meesters
Alternatively you could allow overloading set() to accept an array as its only argument. On Nov 22, 2010 8:40 PM, "Anton Andriyevskyy" wrote: > Separate method is good idea, but the name *setAll *may be confusing, > you may think that it will replace the ones that you have set earlier with > set()

Re: [PHPTAL] Re: Feature request: Allow array as parameter of PHPTAL's set() method

2010-11-22 Thread Anton Andriyevskyy
Separate method is good idea, but the name *setAll *may be confusing, you may think that it will replace the ones that you have set earlier with set(), as setAll looks like "set all that template engine will see". Maybe something like setMultiple or setMany or just setArray will be more democratic

[PHPTAL] Re: Feature request: Allow array as parameter of PHPTAL's set() method

2010-11-22 Thread Moritz Baumann
Kornel Lesiński writes: > > >> $template = new PHPTAL($this->_viewDir . DS . $fileName); > >> $template->set($this->_viewVars); > > > > Another thing that IMHO should be considered is that PHPTAL should > > implement ArrayAccess so you could do > > $template['menu'] = $menu; > > > > Would a pa