Hi Aurélien, > But is it a good idea to "load" all models in AppController whereas > this models are not used in all Controllers that extends > AppController? > Or your trick doesn't "load" the models but just indicates it for code > completion to PDT Eclipse?
Yes nothing is loaded here, it's just a declaration but no initialisation. So this has no effect on the execution of the code. The only thing is that you also get the completion on models you don't use (with $uses) in a controller, but that's not a real problem, because you should always know what you do. ;-) > In the same way, HtmlHelper is declared in CakeCore's Controller Class > so it's not necessary to write "$helpers = array('html');" in our own > controllers, views and helpers? In this case, why couldn't we write > all available Models, Helpers, Components in a unique place (e.g. > AppController)? > Because in practice, there are a lot of same declarations, like > '$helpers = array('html','form')", in our applications! Now here we have the problem that the stuff in these arrays is actually loaded. Its always best practise to only load what you really need, so I cannot recommend to load helpers and components for all controllers in the AppController, but for my small application I don't care much if almost all of my controllers need it. Michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---