Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Loading, which flavour?

edited January 2012 in Modules
Hey,

Just a quick one. When loading are we better off using module_load() or the normal (fuel version) load()?

I notice the comment about module_load begin for matchbox backwards compatibility. Probably best to shoot for FUEL's updated load() signature yeah?

Comments

  • edited 11:55AM
    I'm assuming the FUEL way you are referring to the HMVC method that uses $this->load->library('module/my_library') correct?

    If so, either should work and I guess it depends on your preference. Using module_load is a little more explicit to me so I tend to use it more.
  • edited January 2012
    Everything works, no bugs. I agree it is more explicit using module_library().

    I guess my real question is, as it's commented as backwards compat, is it on the chopping block going forwards? I assume like most things (EG CI supporting php4) backwards only goes so far...

    I was looking at what module_library(), module_view() (etc) are wrapping:

    $this->view($view, $vars, $return, $module);

    Maybe it's better to just use that sig instead?

    I'll take a stab and guess you're hoping (like I am) for HMVC to be CI native?
  • edited 11:55AM
    HMVC is indeed hinted at in this article and I'm definitely hoping it makes it soon:
    http://codeigniter.com/news/codeigniter_2.1.0_belated_release_announcement

    That may play into how we want to implement the use of loading module based files depending on if it does make the cut and how it is implemented, but at the moment, we don't have plans on deprecating it.
Sign In or Register to comment.