i have a huge problem using the public variable "uses" in the CakePHP-Controller.
I set up my application with the following schema.
PagesController extends an AdminController which extends the AppController.
class PagesController extends AdminController
class AdminController extends AppController
I do this because i also got an ApiController instead of the AdminController which used for (as you can mention) an additional API-Layer in my Application.
I include the additional-Layer by using this
App::uses('AdminController', 'Controller');
in the PagesController and
App::uses('AppController', 'Controller');
in the AdminController.
It work fine for me this way.
EDIT:
class AppController extends Controller {
public $uses = array('Print');
}
I want to make a Model called "Print" accessable in every of my Child-Controllers. That is why I initialize it in my AppController
class PagesController extends AdminController {
public $uses = array('Article');
}
In PagesController I want to use "Print"-Model and in addition that declared "Article"-Model. In the Commentary for that $uses-variable is written down that every addition in the Child-Controller will merged into the parent-$uses-variable. But it doesnt do. it overwrite it.
Where is the mistake? Please Help.