Welcome Guest, Not a member yet? Register   Sign In
base model
#2

[eluser]Phil Sturgeon[/eluser]
1. You dont need the constructor unless you are doing something in there.

2. If you re-name to MY_Model it will be automatically loaded

3. Lines like: $query->row()->$field; will return PHP errors if a bad field is given.

4. Each model REQUIRES a get_filter( ) to be defined? Instead of an abstract method in your base class, have a normal method that does something by default and allow it to be extended. Otherwise its a unnecessary dependency for your models.

I dont want to sound like a dick here you have some good ideas. It is very similar to Jamie Rumbelows project which I have been looking into and contributing too. I suggest you give him a shout about adding some of your methods as his base needs some improvements too.


Messages In This Thread
base model - by El Forum - 12-04-2009, 07:23 AM
base model - by El Forum - 12-04-2009, 08:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB