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 <tjerk.meest...@gmail.com>wrote:

> Alternatively you could allow overloading set() to accept an array as its
> only argument.
> On Nov 22, 2010 8:40 PM, "Anton Andriyevskyy" <x.meg...@gmail.com> 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(),
> > as setAll looks like "set all that template engine will see".
> >
> > Maybe something like setMultiple or setMany or just setArray will be more
> > democratic?
> >
> > Anton Andriyevskyy
> > Expert in Business Automation & Web Development
> >
> >
> >
> > On Mon, Nov 22, 2010 at 1:54 PM, Moritz Baumann <flamin...@online.de>
> wrote:
> >
> >> Kornel Lesiński <kor...@...> 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 patch for this be accepted?
> >> >
> >> > Sorry, no. That would duplicate $template->menu = $menu syntax, which
> >> works
> >> already.
> >> >
> >> > I agree about setting all variables in one call, but I'd add separate
> >> method
> >> for it (setAll?)
> >>
> >> Yeah, a separate method might be the better solution. The proposed
> solution
> >> was
> >> just a 1:1 copy from the magento template class we're extending.
> >>
> >> Thank you & regards,
> >> Moritz
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> PHPTAL mailing list
> >> PHPTAL@lists.motion-twin.com
> >> http://lists.motion-twin.com/mailman/listinfo/phptal
> >>
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL@lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>
>
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to