Welcome Guest, Not a member yet? Register   Sign In
Any news on Code Igniter V2 (specifically HMVC) ?

[eluser]wiredesignz[/eluser]
Nice try esra, Somehow I can't see Codeigniter.php coping too well with this. Tongue
Code:
//APPPATH = a:2:{i:0;s:11:"application";i:1;s:10:"extensions";}

include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT);

[eluser]esra[/eluser]
@siric... wiredesignz pretty much summed everything up. However, a module constructed as a sub-application could actually consist of a suite of modules and not necessarily a single module. For example, a CMS could include a content module, categories module, and sections module. You might want to do this in a case were it might be beneficial to share the sections and categories modules with other modules. That is, the categories and sections modules could be designed to support heirarchies for other modules other than content (e.g., weblinks, menu structures, site maps, etc.). It's all a matter of designing modules in a way where you minimize code redundance.

[eluser]Randy Casburn[/eluser]
esra - This is quite similar to our other thread concerning the architect with the pencil and paper and what I eluded to earlier that was all "hot air" according to the OP. The CI architecture "big picture" of where things fit in terms of systems of applications, and modules, and extensions, etc.

Once those things are resolved a much more elegant solution can be found for things like pointing to the directories of the resources.

Randy

<<sheepishly runs for cover as the balloon is filling with too much hot air again>>

[eluser]esra[/eluser]
Cascading file system was based on the original modLoader hacks for CI, so I'm not surprised that the above did not work. modLoader required hacks to many files in order to add additional search paths. Kohana went a bit further by allowing those paths to be user definable based on a config file.

The closest thing then is the directories array in Matchbox:

Code:
/**
* The directories in which your modules are located
*
* Should contain an array of directories RELATIVE to the application
* folder in which to look for modules. You'd usually want to have at
* least 'modules' in your array which will have codeigniter look for
* modules in /application/modules. You can add as many directories
* as you like, though.
*
* NO TRAILING SLASHES!
*
* Prototype:
* $config['direcotires'] = array('modules');
*/
$config['directories'] = array('modules');

[eluser]m4rw3r[/eluser]
I think it would be nice if it's possible to specify the paths to modules in the config.php instead of a generic modules dir.

The advantages with that is that it's better performance (no need to search for all modules) and you can switch modules on/off.

I can easily see a Loader implementation which uses this array with the APPPATH as the first element (automatically prepended).
It would be easy, just loop through all folders and check for the file you're looking for.

[eluser]Dave Stewart[/eluser]
[quote author="m4rw3r" date="1221166922"]I think it would be nice if it's possible to specify the paths to modules in the config.php instead of a generic modules dir.

The advantages with that is that it's better performance (no need to search for all modules) and you can switch modules on/off.[/quote]

Yup, Kohana allows you to list which modules are active in order to cut down on file-finding costs, but modules are still stored in the default modules dir (which you are free to move!)

[eluser]esra[/eluser]
[quote author="m4rw3r" date="1221166922"]I think it would be nice if it's possible to specify the paths to modules in the config.php instead of a generic modules dir.

The advantages with that is that it's better performance (no need to search for all modules) and you can switch modules on/off.

I can easily see a Loader implementation which uses this array with the APPPATH as the first element (automatically prepended).
It would be easy, just loop through all folders and check for the file you're looking for.[/quote]

I have not taken a close look at the core code since 1.5.4. At that point, there was more than one loader. I believe that common.php uses its own loader to load the default controller or the first controller called when the core boots. Config loads config files. The mod_loader effort dates back to 1.5.3 and the forum thread pretty much covers all of the areas where code changes were necessary. mod_loader was released as a hacked version of CI with all of the changes incorporated into the code. I believe that an enhanced version of this code along with regex improvements later became BlueFlame, the original name for the Kohana project.




Theme © iAndrew 2016 - Forum software by © MyBB