I'm developing a multi module project, and I met some trouble, please help.
The enviroment is win7x64, wamp-2.5-x64, phalcon-2.0.2-x64
I copied the sample code from the official document, in index.php, simply add a router to explain the url, in module.php, I add autoloader to load my controllers and models, but they are not found
public function registerAutoloaders(\Phalcon\DiInterface $dependencyInjector = NULL) {
$loader = new \Phalcon\Loader();
$loader->registerNamespaces(array(
'Multiple\Entrance\Controllers' => __DIR__ . '/controllers/',
'Multiple\Entrance\Models' => __DIR__ . '/models/',
))->registerDirs(array(
__DIR__ . '/controllers/',
__DIR__ . '/models/',
))->register();
var_dump($loader->getNamespaces());
var_dump($loader->getClasses());
}
it's very strange var_dump($loader->getNamespaces()) can output the directories and the namespaces,
but var_dump($loader->getClasses()); outputs null
I can't understand it. Also in the following codes, the classes in controllers and models can't be found.