Re: best way to do calculated fields in afterFind

2008-01-15 Thread b logica
On Jan 15, 2008 2:47 PM, Tim W <[EMAIL PROTECTED]> wrote: > > Hi all, > > Is this the best way to create a calculated field in a model object? > It works perfectly, but having to merge an array doesn't seem ideal, > and it's not OO at all. > > function afterFind($results) > { > for ($i

best way to do calculated fields in afterFind

2008-01-15 Thread Tim W
Hi all, Is this the best way to create a calculated field in a model object? It works perfectly, but having to merge an array doesn't seem ideal, and it's not OO at all. function afterFind($results) { for ($i=0; $i < count($results); $i++) { $lens = $results[$i]['Lens'];