[Solar-talk] Changes afoot: a new Model class

Rodrigo Moraes rodrigo.moraes at gmail.com
Wed Feb 7 17:26:36 PST 2007


On 2/7/07, Paul M Jones wrote:
> If you *really* wanted to get tricky, you could add __call() to the
> record class, and have it call methods in $this->_model as needed,
> based on a whitelist of allowed methods or something.  You could even
> do that in a base Vendor_Sql_Model/Record/RecordSet class set, and
> extend from that.
>
> So I guess my answer is, "it depends".  If the methods are needed
> manually, per-record, or they only apply at certain times in the life
> of each record individually, then in the Record seems best.  But if
> they apply for every record every time at existing hooks in the
> Model, then in the Model seems best.
>
> Does that help at all?  If not, happy to talk more.  :-)

Makes perfect sense for me; I said previously that business logic goes
normally on a per record basis, but yes, we have commonly logic
executed on fetch/save (currently in Solar_Sql_Table) that would then
move to Solar_Model.



More information about the solar-talk mailing list