Always Import Module Files?

hi,

in my /config/main.php, i get some module names from DB, and add them to ‘modules’ array.

everything worked fine, and i could turn on/off specific modules by adding their name to the DB.

but when i tried to use the module models in another module, i got this error:

include(Nomre.php): failed to open stream: No such file or directory

then i found out that i have to import my model files in main.php

doing so, the problem got fixed

my question is do i always have to import module files in main.php?

if so, then what does this line of code in module files do?


// import the module-level models and components

		$this->setImport(array(

			'admin.models.*',

			'admin.components.*',

		));

And is there a way to import all models in all modules with one line. something like this:

application.modules..models.

thanks