Hi, does anyone know how to convert loadModel() to App::import
properly?

I have something like this (this works):

class MenuComponent extends Object
{
        function getMenu(&$controller)
        {
                loadModel('Menu');
                blah... blah...
        }
}

then I try to change to App::import since loadModel has been
deprecated:

class MenuComponent extends Object
{
        function getMenu(&$controller)
        {
                App::import('Model', 'Menu');
                blah... blah...
        }
}

I got the following error:
Fatal error: Class 'App' not found in <my file path>

--~--~---------~--~----~------------~-------~--~----~
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