Welcome Guest, Not a member yet? Register   Sign In
Objects of Models within models?
#2

[eluser]Randy Casburn[/eluser]
Code:
$CI =& get_instance();
$CI->load->model('User_model');

Will load the model make a mode available to you in the $CI super object. This really only provides you access through static calls to members of the class thus: User_model::memberName. Depending on PHP version you may have problems with visibility using the class as a static class. Your methods could still be access through CI's calls.

Your other option would be to think about turning these into libraries and instantiating them properly if you need true objects that provide you more than just static classes.

Hope this is helpful.

Randy


Messages In This Thread
Objects of Models within models? - by El Forum - 07-04-2008, 10:05 PM
Objects of Models within models? - by El Forum - 07-04-2008, 11:09 PM
Objects of Models within models? - by El Forum - 07-05-2008, 03:32 AM
Objects of Models within models? - by El Forum - 07-05-2008, 10:35 AM
Objects of Models within models? - by El Forum - 06-07-2011, 02:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB