I need to load controller class and I try:
App::import('Controller','AppController');
or
App::import('Controller','PagesController');
But this every time returns false. When I try this:
App::import('Model','AppModel');
it returns true, so it seems it’s not working for controllers – why?
When using
App::import(type, name)for a controller, you don’t need to include “Controller” in the name you import, just when creating the instance variable.