Welcome Guest, Not a member yet? Register   Sign In
CI2 - Model class - isset() fails
#8

[eluser]Pascal Kriete[/eluser]
A lot of people are used to treating the model as if it were the super object, but I really want to get away from that idea.

Quote:The reason for using isset() in this particular case is that the model needs to test if a database is present (i.e. is configured) or not.
Simply doing $this->load->database(); when the database isn’t configured causes a serious error.

I still don't understand the reasoning behind doing this. Does every one of your models do this? Isn't it something you would want your application work out on installation? Or worst case - once per request?


Messages In This Thread
CI2 - Model class - isset() fails - by El Forum - 11-12-2010, 07:18 AM
CI2 - Model class - isset() fails - by El Forum - 11-12-2010, 07:39 AM
CI2 - Model class - isset() fails - by El Forum - 11-12-2010, 08:00 AM
CI2 - Model class - isset() fails - by El Forum - 11-12-2010, 09:20 AM
CI2 - Model class - isset() fails - by El Forum - 11-12-2010, 10:32 AM
CI2 - Model class - isset() fails - by El Forum - 11-12-2010, 01:31 PM
CI2 - Model class - isset() fails - by El Forum - 11-12-2010, 02:22 PM
CI2 - Model class - isset() fails - by El Forum - 11-12-2010, 03:48 PM
CI2 - Model class - isset() fails - by El Forum - 11-12-2010, 04:45 PM
CI2 - Model class - isset() fails - by El Forum - 11-12-2010, 05:24 PM
CI2 - Model class - isset() fails - by El Forum - 11-12-2010, 05:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB