Is there a way to put your own code into namespaces using cakephp? The following very simple controller class works fine.
class Customer extends \AppModel {
var $name = 'Customer';
}
However, if I add
namespace foo\bar;
cakephp can’t find the controller anymore. Is there some way to tell cake in which namespace it should look for controllers?
I am using cakephp 1.3 and php 5.3.
I don’t think there is. CakePHP looks for classes like
PostsControllerorBlogController, notfoo\bar\PostsController. Maybe you can tell CakePHP in what folder to look for those classes (probably), but then it will still be looking for unnamepsaced class names.Why would you want this in a framework that doesn’t use namespaces?