This is my first post as FuelPHP user, and I have one question about usage of modules. I have created a class Utils into directory app\modules\utils\utils.app I change my config.php into app\config\config,php including the follow declaration:
All classes should go into the "classes" folder. A module needs to have the same structure as your app folder, with "classes", "classes/controller", etc...
I have another question: my class don't extends any other (controller, model or view) is a new class. If I create a directory as model/classes/controller or model/classes/model/ or model/classes/view I need extends this classes (controller, model or view)???
Classes go into the 'classes' folder, following the "cascading file system".
A location of a file is determined as follows: - take the namespace and the classname, and concatenate them using a slash as separator - replace all slashes, backslashes, and underscores to DIRECTORY_SEPARATOR - append '.php'.
so, if your class is called "Controller_Test" in the global namespace, it would be in "classes/controller/test.php". If the class is called "User_Meta" in the namespace "Model", it would be in "classes/model/user/meta.php". If the class is called "Test" in the global namespace, it would be in "classes/test.php".
You can deviate from these rules by telling the autoloader where to find a namepace. This is used by Modules and Packages, to map their namespace to their 'classes' folder. This is usually done in a bootstrap file (for modules, it's build into the Router and Module class).