I don't think this is a very good idea.

I mean, a HtmlHelper is a HtmlHelper. If you modify it, it becomes
"ProfireHtmlHelper" and it is no longer supposed to be "HtmlHelper".
And if someone else tries to use it now knowing it's not the same
anymore, there might be hair loss. I'd go with AdvancedHtmlHelper or
ExtendedAjaxHelper or whatever; what is the point of "reusing" the
same name with a different class?? To confuse someone?

That's just my 2c.

On Feb 5, 4:50 pm, grigri <[EMAIL PROTECTED]> wrote:
> While it's true that submissions to trac *do* help extend the
> functionality of the core code, I do see ProFire's point.
>
> There is no way that a helper can perform everything that you'd want,
> even if it was totally bloated with code. It would be nice to be able
> to extend the core helpers without replacing them entirely, but also
> without changing the name.
>
> One possible way would be helper aliases. For example, in your
> controller you could do:
>
> var $helpers = array('Html' => 'MyHtml');
>
> which would load the 'MyHtml' helper but alias it as Html. Assuming
> your MyHtmlHelper extends HtmlHelper, this would work smoothly. You
> could just override the methods you need, and bob's your uncle.
>
> One problem with this would be keeping track of the whole helper chain
> - for example if you've aliased MyHtml to Html, and another helper
> (Ajax?) uses the HtmlHelper, which one does it load? The original or
> the overloaded one?
>
> What are your thoughts on this? Does anyone else think this is a good
> idea?
>
> On Feb 5, 2:56 pm, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
>
> > Why not submit your modification to trac, perhaps it's good enough to
> > be accepted!
>
> > On Feb 5, 1:22 pm, ProFire <[EMAIL PROTECTED]> wrote:
>
> > > Hi Bakers!
>
> > > Been using CakePHP for some time already and I'm getting the hang of
> > > it. I'm loving it too.
>
> > > However, as CakePHP is still young, I noticed a few missing features.
> > > More specifically, AjaxHelper! I have modified the core file,
> > > ajax.php. So far it works fine for now.
>
> > > I would like to ask, is there a way to modify/extend the features of
> > > the core helpers without modifying the core files? The way I know of
> > > is to create an entirely different helper, but I won't be able to
> > > reuse the name.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to