Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions - (HMVC) - Version 3.1.9

if you want to keep views original, just use normal $this->load->view('view', $data, FALSE).

Module views require you to add the module name such as $this->load->module->view('view', $data, FALSE)

You can seperate the library files from the helper if you wish. But I didn't want to write checking for if !class_exists() for the Loader library, plus it must not ever be visible to CodeIgniter or they will fight. :lol:.

The wiki is updated, Modular Extensions - HMVC

Thanks for your feedback. Smile

[eluser]Edemilson Lima[/eluser]
Okay, you are the man! If you say so, I must agree with you. Smile

As this new version allow us to almost organize complete MVC into folders, will this new version compete with Matchbox in some extent?

I am just about to update the wiki again. :lol:

Version 3.0.1 will have ability to use modular Controllers, Libraries, Models and Views.

Version 3.0.2 Is a bug fix.

Version 3.0.3 will add Config, Helpers and Plugins.

It's turned out rather easy to do because of the way the modules loader operates.

Man, I can't believe this! This will combine the best of Matchbox with the best of modular partials! And all in just one convenient helper. Can't wait to see version 3.0.2 (but I probably won't have to wait long, you're so fast!).

Keep up the marvelous work, Wiredezignz, this is going to be soooo useful.

I believe it will eventually be more powerful than Matchbox. :coolsmile:

Modules can attach to, and extend, any currently loaded core object as well as providing Modular Separation for you applications.

Modules can be written as just about any component. They can be controllers, helpers, libraries or models depending on how you create them.

Just two weeks ago I met up with Gavin (Codex on the CI forums) and we were talking about how cool it would be if modules could be used as partials, and now it's there!

What I like best about it is that modules can be shared easily, even between different applications built on CI, because the module doesn't need to have a notion about the rest of the app (how the layout is handled, how the rest of the system is built, etc.). The module can be a standalone partial functionality, which can easily be shared among different apps, even made by different coders.

Current Version 3.0.1 is in the wiki.

The Modular Extension directories can now be organised with proper structure: ie Controllers Libraries, Models and Views (Config, Helpers and Plugins to come later).


modules::run('search', $config, 'a_method');

$this->load->module->library('a_library', $config);

$this->load->module->model('a_model', 'an_alias', TRUE);

$this->load->module->view('form', $data, FALSE);


To extend CI_Libraries, just use the same filename for your own library. MY_Library will also get loaded as per normal.

$this->load->module->xxxxx only works from within a Module. Don't try it in a Controller. :exclaim:

It works, I'm using it, it is PHP4 compatible. :coolsmile:

My profiler tests indicated best page rendered in 0.0488s - with 3 Modules, 2 Models and 4 View partials.
3 MYSQL Database queries.
Memory usage 1.3mb

what is the different between this and matchbox???

The difference is great, the functionality is similar.

Modular Extensions is one drop in file, it requires no CodeIgniter core alteration, it is totally extendible.

But you still require a base controller to handle requests and decide which module to run.

Theme © iAndrew 2016 - Forum software by © MyBB