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
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,
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
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
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
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()
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
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