models. *
classes. *
How do not import some files of the directories? And import them only when we need?
For example: I need import file models/SomeModel.php only in controller SomeController.php. I need import file classes/SomeClass.php only in controller SomeController.php and Some2Controller.php.
use when needed:
But beware that
import()
is different thanrequire
orinclude
, import relies on Class names being the same as file names.