CodeIgniter Forums
Modular Extensions - HMVC version 5.4 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Modular Extensions - HMVC version 5.4 (/showthread.php?tid=38057)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


Modular Extensions - HMVC version 5.4 - El Forum - 01-28-2011

[eluser]wiredesignz[/eluser]
Modular Extensions - HMVC version 5.4 is available from Bitbucket. (see my signature below)

CodeIgniter version 1.7 is no longer supported.


Modular Extensions - HMVC version 5.4 - El Forum - 01-29-2011

[eluser]Twisted1919[/eluser]
Just updated a project of mine to ci 2.0 official and HMVC 5.4, and wanted to thank you for the excellent work
you made with hmvc Smile


Modular Extensions - HMVC version 5.4 - El Forum - 01-30-2011

[eluser]n0xie[/eluser]
Thanks again wiredesignz. Your extensions has helped a lot.


Modular Extensions - HMVC version 5.4 - El Forum - 01-30-2011

[eluser]InsiteFX[/eluser]
Thank you ver much, wiredesignz...

InsiteFX


Modular Extensions - HMVC version 5.4 - El Forum - 01-30-2011

[eluser]kimp[/eluser]
Hey wiredesignz,

Thanks, fantastic. One quick point - it seems I can not use the get_instance() funtion in a library when the controller has inherited from MX_Controller. Any plans to change this? Or should I be finding a workaround for each of my libraries?

(I raised this in an earlier post, http://ellislab.com/forums/viewthread/179478/)

Much appreciated,

Kim


Modular Extensions - HMVC version 5.4 - El Forum - 01-30-2011

[eluser]wiredesignz[/eluser]
With HMVC you need to pass into or set the controller instance for the library before using it.
Code:
$this->load->library('form_validation');
$this->form_validation->CI =& $this;

/* or */

$this->load->library('form_validation', array('CI' => $this));
And then process the parameters inside the library constructor yourself.


Modular Extensions - HMVC version 5.4 - El Forum - 01-30-2011

[eluser]kimp[/eluser]
Thanks.


Modular Extensions - HMVC version 5.4 - El Forum - 01-31-2011

[eluser]Lucas Alves[/eluser]
Thanks, wiredesignz.

I have a doubt: Can I load a config file from a module using application/config/autoload.php $autoload?


Modular Extensions - HMVC version 5.4 - El Forum - 01-31-2011

[eluser]kimp[/eluser]
Hi wiredesignz,

Another quick point. When I'm not using HMVC, I can access controller properties in a view using $this->variable. As soon as MY_Controller inherits from MX_Controller, however, the property is no longer available.

I've been reading up on the CI object hierarchy, including this article by David Upton, http://www.packtpub.com/article/codeigniter-and-objects, but I'm having difficulty understanding how this changes when we use HMVC...

Any assistance appreciated..., Kim


Modular Extensions - HMVC version 5.4 - El Forum - 02-01-2011

[eluser]eoinmcg[/eluser]
most useful and very much appreciated!

thanks, wiredesignz!