It is a different way of doing things than your object with a load and
save method.
The data is not encapsulated behind method calls and it's trivial to
get the raw array and manipulate it.

Here is an option.
Virtual fields - I usually do this on a custom function, but I'm sure
you could do it with the standard find methods
Simply do your processing and loop through the array and tack on the
extra values (allow comment true or false)

On the save these extra fields will be ignored by the normal code since
they don't match the database table and you can again do your own
processing.

You can also create methods that accept a data array as one of their
parameters or do their own find internally to get the data

PHP is not JAVA so don't go overboard.  What your loosing here is the
encapsulation, you can still create your methods that handle all the
complexity, you just can't "protect" your
raw data from getting manipulated in the arrays - but who do you really
need to protect your raw data from? Most of the time you are okay just
to leave a don't do this comment and not worry about it.  If that
doesn't work for you lock it down by overriding the normal methods and
return a blank array or if your using php5 throw an exception.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to