Agile Toolkit is a PHP framework for developing Powerful Web Applications. Inspired by Desktop Toolkits (QT, Cocoa, .NET) it provides clever web application framework for developers with any skill level. Agile Toolkit free for open-source projects and has commercial support.
Actually it seems that this is the desired design, so a controller can act and the model stores the actual state of the data (that could also lead to reuse the same instance of the controller on multiple models).
I think the dirty array should be erase after the saving.
I the dirty fields represent the differents between the model data and the source (like db) after the save, the dirty array should be empty
In the load method of the Model there's a call to load method of the controller. In the tryLoad method of the Model there's a call to tryLaod method of the controller. Why don't uniform this?
I suggest to use only tryLoad controller's method
Those methods should be used to serialize and unserialize a model, but the serialization don't store the type of the controller and the other members (like conditions)
Actually the load hooks are a mess, some kind of load have an hook othesrs have different hook, others have no hook at all.
Instead of having different hooks on each kind of load (load,loadBy, loadAny) we can use a single kind of hook with the first parameter that specify the kind of load and eventually the other parameters as array exacly like the load method signature.