Autloading modular forms & models in Zend Framework 1.8

It’s not really obvious with the error messages you get, but using a thing like Form_Login does not work out of the box with a modular structure. Which is slightly surprising considering that it’s inside the default module.

I have found examples like the second one below, but no one mentions that you actually declare the default namespace too for everything to work.

$autoloader = new Zend_Application_Module_Autoloader(array(
	'namespace' => '',
	'basePath'  => APPLICATION_PATH .'/modules/default',
	'resourceTypes' => array (
		'form' => array(
		'path' => 'forms',
		'namespace' => 'Form',
    ),
	'model' => array(
		'path' => 'models',
		'namespace' => 'Model',
    	),
    )
));

$autoloader = new Zend_Application_Module_Autoloader(array(
	'namespace' => 'Admin_',
	'basePath'  => APPLICATION_PATH .'/modules/admin',
	'resourceTypes' => array (
		'form' => array(
		'path' => 'forms',
		'namespace' => 'Form',
    ),
	'model' => array(
		'path' => 'models',
		'namespace' => 'Model',
    	),
    )
));```