ZF-7805: Zend_File_Transfer_Adapter_Http - Ability to supply callbacks for rename filter
Description
I've just seen there's a simillar issue [ZF-4261], but I think I've come up with better solution.
What about allowing to apply the user-defined function, where all logic for rename is contained. Lets take a loook:
<?php
function func_name($oldName, $ext, $dest, $userData) { //now we can do a lot! loops, expressions, if conditions, etc
$newName = $userData['prefix'] . $oldName . $userData['suffix'] . $ext; while (something){
} return $newName; }
//...
$adapter->addFilter('Rename', array('func_name', $userData));
Comments
Posted by Thomas Weidner (thomas) on 2009-09-20T13:34:02.000+0000
Fixed false component assignment
Posted by Rob Allen (rob) on 2012-11-20T20:52:34.000+0000
Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".
Feel free to re-open and provide a patch if you want to fix this issue.