Whoops, App::import('Helper', 'ModelName') should of course be
App::import('Helper', 'HelperName') :P
On Jan 28, 2008 4:02 PM, Arjen V. <[EMAIL PROTECTED]> wrote:
> Assuming that you're using CakePHP 1.2: the loadModel, loadHelper etc.
> functions are deprecated. You have to us use App::import('Model',
> 'ModelName'), App::import('Helper', 'ModelName'), etc. now.
>
> - Arjen
>
>
> On Jan 28, 2008 2:25 PM, boyracerr <[EMAIL PROTECTED]> wrote:
>
> >
> > Sorry, but I've just been told about loadModel(), which does exactly
> > this. I did Google first, I swear.
> >
> > If anybody would like to comment on the advantages/drawbacks of
> > working like this though, I'd be interested to hear your thoughts.
> >
> > Benjamin
> >
> > On Jan 28, 12:15 pm, boyracerr <[EMAIL PROTECTED]> wrote:
> > > Hi to all,
> > >
> > > I'm currently getting stuck in to my first major CakePHP application.
> > >
> > > I'm writing the search functionality, one of the requirements for
> > > which is a unified search which can return different combinations of
> > > models.
> > >
> > > So, what I'd like to do is to be able to add models dynamically to the
> > > controller, depending on the incoming action. I wanted to just modify
> > > the 'uses' array in the relevant actions, but this doesn't work (I
> > > presume all that stuff is constructor handled).
> > >
> > > My questions are:
> > >
> > > 1. Is it possible to do this?
> > > 2. Is this a stupid idea?
> > >
> > > Thanks for any tips,
> > > Benjamin
> >
> > > >
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---