Assume that we have the next code:
...
$app = new \Phalcon\Mvc\Application($di);
$app->registerModules(array(
'content' => array(
'className' => 'Content\Module',
'path' => '../modules/content/Module.php'
),
'auth' => array(
'className' => 'Auth\Module',
'path' => '../modules/auth/Module.php'
)
));
echo $app->handle()->getContent();
I losed many hours in reading manuals and debugging getting the next exception: Service 'Module' wasn't found in the dependency injection container
It was caused by mistake: 'classname' instead of 'className' in code.
I think that this post help people save time, because the text of exception is not helpful. 'array-orientated programming' style of this part of framework and my inattention caused this awful error.