spadefoot/kohana-orm-leap — pull request #63 by taai (2012-08-16 15:22:26+00:00)
Title: Big changes has been done.

As we talked with @bluesnowman yesterday, Leap is leaving PHP 5.2.x in branch 3.2/legacy and move on to PHP 5.3.x, so we can use really needed functionality.

1. I got rid of most call_user_func() and use static:: instead. There are things that couldn't be done without it.
2. I changed all ```self::``` to ```static::```, because it's the right way to make everything extendable. In few 3. places that ```self::``` strategy actually was giving unexpected results.
3. I got rid of ```is_null($value)``` and now using ```$value === NULL``` instead, because it's just better performance (at least twice as fast or more).
4. I did replace ```is_field()```, ```is_alias()``` and ```is_adaptor()``` with ```isset()``` in places where it didn't make sense, so I did gain a little performance.
5. In function ```as_array()``` there was no adaptors or aliases values included, so I added them.
6. I modified ```save()``` function and added ```create()``` and ```update()``` functions, so the issue #62 is now solved. I found it more useful to leave the main functionality in ```save()``` function and not to duplicate code in newly created ones.
7. In my previous pull request I did introduce ability to set the 'default' field value setting to NULL, because you may want the default value to be a NULL, but it wasn't actually added to the repository, so I did it again. The thing is that ```isset()``` returns FALSE, if the value is NULL, so now we are using ```array_key_exists()```.

One day spent. That's all for now. I hope you will like it. ;)

Next to come: model validation. I will probably talk more about this with @bluesnowman before pushing.