User Interface Model |
[eluser]renownedmedia[/eluser]
My first contribution to the Ignited Code forum! Here is a model I built which I've been using for all of my websites which have a table of users. You can specify the names of the table and columns using a config file. Every time you access the model functions (update, modify, etc) you can specify which columns you want to work with. Here's an example of the implementation: Code: $new_user_id = $this->rm_user->create('username' => 'tlhunter', 'password' => 'pass'); And here is the URL to the full thing: http://renownedmedia.com/codevault/User_...base_Class
[eluser]wiredesignz[/eluser]
Good work. Try not using $this->config->item() like you would use an array, it is actually a method call (as you know) and is very slow. Grab the entire config array once only and store it locally.
[eluser]renownedmedia[/eluser]
Thanks for the heads up, didn't realize the overhead doing it this way. How do you return an array of all the config items? Didn't see it when I looked at the user guide.
[eluser]wiredesignz[/eluser]
Force config to use an index when loading your config array from file. Code: $this->config->load('settings', TRUE); Then a single call will retrieve the entire array. Code: $settings = $this->config->item('settings'); |
Welcome Guest, Not a member yet? Register Sign In |