CodeIgniter Forums
Yet another MY_Model - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Yet another MY_Model (/showthread.php?tid=53963)



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

[eluser]alexwenzel[/eluser]
Hi guys,

I wrote a new model override for codeigniter. I know there are plenty of them outside, but i started to write this model mostly for my own.
But now i decided to make it popular, because its so much fun to work with.

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::by_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 use
- easy to install
- short syntax
- method chaining
- form-validation with one call
- all based on CodeIgniters own active record class !!!



Project-Site:

https://bitbucket.org/alexwenzel/my_model



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



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!


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

[eluser]MatthewSchenker[/eluser]
Greetings Alex.
Thanks for posting this! I like how clearly you have developed the methods here.

I've been getting into using Jamie Rumbelow's famous My_model, but I definitely like where you're going with your ideas.

I'll keep my eyes on your project and will experiment with it in one of my next apps.

Thanks again,
Matthew


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

[eluser]alexwenzel[/eluser]
Thanks. I ever try to keep things simple and save.

Just you know:

I have updated the bitbucket-wiki just in this moment, which covers all informations on MY_Model

https://bitbucket.org/alexwenzel/my_model/wiki/Home


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

[eluser]Aken[/eluser]
So you're releasing an ORM of sorts that doesn't even have a delete feature yet? Jumping the gun a bit there...

Also, there's a forum section dedicated to add-on code (Ignited Code). You should post this there instead.


Yet another MY_Model - El Forum - 08-17-2012

[eluser]alexwenzel[/eluser]
[quote author="Aken" date="1345151724"]So you're releasing an ORM of sorts that doesn't even have a delete feature yet? Jumping the gun a bit there...

Also, there's a forum section dedicated to add-on code (Ignited Code). You should post this there instead.[/quote]

Didnt see the other forum first. I already posted there.

I also added full functionality now. Tongue check out the wiki. Would be nice to hear your opinion.


Yet another MY_Model - El Forum - 08-17-2012

[eluser]Aken[/eluser]
Better! Smile I'll try to check it out one of these days. If it was on Github I'd fork it.