I usually do :
if(!isset($this->helpers['Time']))
$this->helpers[] = 'Time';
Seems a lot of concern about performances (even if this checked by
cake, that avoid the cake checking) ..
My 2 (maybe 1) cents..
On Jun 24, 11:13 pm, "Federico Rinaldi" <[EMAIL PROTECTED]>
wrote:
> It actually works but the Helper's callbacks are not called so is only
> viable if you don't need them.
>
> On Thu, Jun 19, 2008 at 9:48 AM, Chris Hartjes <[EMAIL PROTECTED]> wrote:
>
> > On Wed, Jun 18, 2008 at 9:15 PM, Turnquist, Jonah <[EMAIL PROTECTED]>
> > wrote:
>
> > > I do not understand I did not give an answer I gave another question,
> > > the question mark indicating that. Does the RAM not effect
> > > performance? also, it does not matter if the database is slower than
> > > the loading of the helper. That does not mean I should not optimize
> > > other areas besides the database. Also I do not want the Time helper
> > > loaded into all the actions because they are not used there, and that
> > > is bad organization, and organization is what cakePHP is about,
> > > right? So why not try to be organized.
>
> > My point was that there are probably other things that are more likely
> > to affect the performance of your application than loading the Time
> > helper for every action in a controller.
>
> > And how can you say that "it does not matter if the database is slower
> > than the loading of the helper"?!? Of course it matters. How can
> > someone who is so concerned about "speed" ignore such a thing as the
> > "speed" at which you get data from a database?
>
> > In the interest of avoiding further douchebaggery, I will agree to
> > disagree with you on the topic of premature optimization. Glad that
> > Mr. Snook found the answer for you. My solution was missing a step,
> > but I have no idea if it was going to work:
>
> > App::Import('Helper', 'Time');
> > $timeHelper = new TimeHelper();
> > $this->set('timeHelper', $timeHelper);
>
> > and then in your view you could reference the helper via $timeHelper.
>
> > Like I said, it *looks* good but no idea if it would work.
>
> > --
> > Chris Hartjes
> > Internet Loudmouth
> > Motto for 2008: "Moving from herding elephants to handling snakes..."
> > @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---