Question: which is the preferred method; App::import or loadModel? Jeremy Burns Class Outfit
[email protected] http://www.classoutfit.com On 30 Jun 2010, at 08:54, Erik Starck wrote: > Hi, > this is a bit more "cakeish": > > App::import('Product', 'Product'); > $this->Product = new Product(); > > Now you can use the model as you ordinary would with e.g. > $this->Product->find(...) > > > Erik Starck > @erikstarck > http://www.softwaresweden.com > > On Tue, Jun 29, 2010 at 5:12 PM, WhyNotSmile <[email protected]> > wrote: >> Thanks for the replies. Erik's solution worked (using >> ClassRegistry). For some reason, loadModel threw an error. >> >> I may rewrite it to use a behaviour, but at least it's working for >> now! >> >> Thanks again, >> Sharon >> >> Check out the new CakePHP Questions site http://cakeqs.org and help others >> with their CakePHP related questions. >> >> 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 >> > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > 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 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
