[Solar-talk] Making $record->save() return boolean?

Travis Swicegood development at domain51.com
Tue Mar 11 11:53:58 CDT 2008


Howdy...

On Mar 11, 2008, at 8:56 AM, Paul M Jones wrote:

> For record saving, which is a frequent occurrence, I think this is  
> a valuable convenience.
>
> Anybody have strong feelings about this one way or the other?

I'm not sure I see a use case for having it return a boolean?  The  
name save() to me implies it worked or there's a problem.  I don't  
see a case where returning false is necessary.  If a particular save  
method is supposed to do something on a failure, shouldn't that save  
method extend the superclass' method and implemented that logic  
inside the model so it is portable and reusable?

-T


More information about the Solar-talk mailing list