On Jul 13, 1:38 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On 7/13/07, Gorka <[EMAIL PROTECTED]> wrote:
>
>
>
> > imageUpload, videoUpload, docUpload, spreadsheetUpload, ... classes.
> > Thoughts?
>
> IME most often the functions which act on the file at the time of upload are
> also needed in, to coin a phrase, non upload situations.
I made a typo in my previous message
"and the image version has functionality to create/delete thumbs"
should have read
"and the image version has functionality/calls to create/delete
thumbs"
In the context of an auto-thumbnail-making behavior I think a vendor
approach, with a skinny behavior to 'hook' it in, is much preferred.
The only doubt I have is how to do so without introducing, or at the
very least by reducing, coupling & dependencies.
If a robust 100% generic upload behavior exists. if you then had to
write in your SpecificUploadBehavior (if that approach is followed):
beforeDelete(&$model) {
if (!parent::beforeSave()) {
return false;
}
extract ($this->settings[$model->name]);
vendor('Something' );
if (VendorClass::addFluff($aSetting, $anotherSetting, $model-
>data[...], ...)) {
return true;
}
}
Does that seem a way forward?
AD
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---