Welcome Guest, Not a member yet? Register   Sign In
Settings Library
#2

[eluser]PhilTem[/eluser]
Nice. Has even less lines of code than my settings-library Big Grin

I just have two questions:
- Why do you do while($row = $query->fetch_assoc()) instead of foreach ( $query->result() as $row )? I'm always using the second way (with caching of course) so I'm just curious why you chose to use the first way.
- Does one really need the checks on if ( $this->ci === null ) and if ( $this->items === null ) One could simple run the get_instance() function in the constructor and the _refresh_items() method without the preceding check, can't we?

I even like the way you store the values for false, true, null and empty. I never really had thought of this one within my settings-library.

If you wanna have a look at an older and almost deprecated version, you can do so here.


Messages In This Thread
Settings Library - by El Forum - 02-01-2012, 04:31 AM
Settings Library - by El Forum - 02-01-2012, 07:12 AM
Settings Library - by El Forum - 02-01-2012, 09:10 AM
Settings Library - by El Forum - 02-01-2012, 11:14 PM
Settings Library - by El Forum - 02-02-2012, 12:54 AM
Settings Library - by El Forum - 02-02-2012, 02:01 AM
Settings Library - by El Forum - 02-02-2012, 02:35 AM
Settings Library - by El Forum - 02-02-2012, 07:33 AM
Settings Library - by El Forum - 02-02-2012, 08:29 AM
Settings Library - by El Forum - 02-03-2012, 11:21 PM
Settings Library - by El Forum - 02-03-2012, 11:58 PM
Settings Library - by El Forum - 02-04-2012, 01:10 AM
Settings Library - by El Forum - 02-04-2012, 02:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB