Re: HTML_Template Interface recommendation

From: Date: Sat, 08 May 2004 03:24:35 +0000
Subject: Re: HTML_Template Interface recommendation
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-28998@lists.php.net to get a copy of this message
I think this is definitly something we should do (not interfaces, but an RFC for method names, look at all the packages that use renderers - a different file for each template engine kinda sucks. We could put some interfaces in the HTML_Common class, a couple for each different type of package... "Alan Knowles" <alan@akbkhome.com> wrote in message news:409C47E1.6030900@akbkhome.com... > > > Do you think? To get that working the PEAR community has to endorse it > > and have the package maintainers implement the interface in their own > > packages. > > > I'm not very keen to see dependancies on Interface files for packages, > one of the goals is to 'try' and keep the package interdependancies down. > > That said it has been discussed numerous times that it would be good to > have a list of recommended method names, so you could start a RFC on it.. > > on the template ones, setTemplate is called compile($filename) in flexy, > which in it's particular case is far more descriptive. the render (or > display) may be an improvement on on outputObject($object_with_vars) > > from what I remember the list started something like: > toString() > toHtml() > toXml() > to*() > > outputHtml() or renderHtml() or displayHtml() or outputToHtml(), > renderToHtml(), displayToHtml() ?? > > factory() > contruct() ??? == new when it may return an error ??? > singleton() > > set*() / get*() / it would be nice to have recommendations to stop > 'over-use' of these.. > add*() > remove*() > insert*() > is*() > > setOptions() / getOptions() ?? or replace it with options(var_args) ?? - > always thought the single/plural get/set added considerable bloat. > > connect() /disconnect() > > load*() > > ********** > you may have difficulty in building a large list and getting a > consensus. - If you construct a list in an RFC, gather up all views, and > on the more contensious ones, do straw polls each of them. (having > summarized the various views) > > Regards > Alan > > > > > -Philippe > >

« previous php.pear.dev (#28998) next »