CodeIgniter Forums
Just another MY_Model - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Just another MY_Model (/showthread.php?tid=53968)



Just another MY_Model - El Forum - 08-16-2012

[eluser]alexwenzel[/eluser]
Hi guys,

I wrote a another model override for codeigniter.

I know there are plenty of them outside, but i started to write this model mostly for my own.

If you ever wanted to work with models like this ...

Code:
$newuser        = new User();
$newuser->name  = 'damn-its-nice';
$newuser->email = '[email protected]';
$newuser->save();

Code:
$user           = User::find('id', 2);
$user->name     = 'damn-its-nice-updated-by-id';
$user->email    = '[email protected]';
$user->save();

... my model is probably something for you.


Advantages:

- easy to install
- easy to use (not that complex like an ORM, but probably powerfull like one)
- short, readable syntax
- method chaining
- based on CodeIgniters active record class



Project-Site:

https://bitbucket.org/alexwenzel/my_model



ISSUES:

Please commit all issues directly to the issue tracker on bitbucket ...

https://bitbucket.org/alexwenzel/my_model/issues?status=new&status=open

... or contact me!



General informations:

I have implemented almost all methods from CodeIgniter for method chaining.
You can visit the CodeIgniter documentation for this under:

http://ellislab.com/codeigniter/user-guide/database/active_record.html


Just another MY_Model - El Forum - 08-30-2012

[eluser]alexwenzel[/eluser]
I redesigned MY_Model for more easier use.

Its currently version 1.1 and even has a doxygen generated class documentation.

Check out the bitbucket wiki for more informations.