ClassRegistry actually does not work with classes that have name differente
from the filename.
Like TimeHelper the filename is time.php (should be time_helper.php to
work).
Use App::import to import the helper and then make a instance by yourself.
Regards,
On Thu, Nov 20, 2008 at 11:57 AM, Predominant <[EMAIL PROTECTED]> wrote:
>
> I can't help you with your lunch issue...
> But try:
>
> $time = ClassRegistry::init('Helper', 'Time');
>
> Cheers,
> Graham Weldon
>
>
> On Nov 20, 5:48 pm, Joel <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm trying to load the TimeHelper from a console, but I'm not having
> > much lunch.
> >
> > Can someone give me a pointer how to do this?
> >
> > I've tried:
> > App::import('Helper','TimeHelper');
> > App::import('TimeHelper');
> >
> > ClassRegistry::init('TimeHelper');
> > ClassRegistry::init('Time', 'Helper');
> > ClassRegistry::init('TimeHelper', 'Helper');
> >
> > $time = ClassRegistry::init('TimeHelper', 'Helper'); gives the error:
> > Fatal error: Class 'Helper' not found in /home/jpearson/ZDE/workspace/
> > cmhr/cake/libs/view/helpers/app_helper.php on line 40
> >
> > Thanks,
> >
> > -Joel
> >
>
--
Renan Gonçalves aka renan.saddam
Software Engineer - CakePHP Core Developer
Cell Phone: +55 11 8633 6018
MSN: [EMAIL PROTECTED]
São Paulo - SP/Brazil
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---