I came up with a solution, but it involves modifying ditto.class.inc.php
I changed line 309 in the "set custom placeholder" section from:
$placeholders[$name] = call_user_func($value[1],$resource);
to:
$placeholders[$name] = call_user_func($value[1],$resource, $value[3]);
By adding $value[3], It allows extender developers like me to pass an array of parameters to our functions
My extender now looks something like this:
<?php
foreach ($config['options'] as $name => $value)
{
$placeholders[$name] = array($value,"myPlaceholders", "",array('name'=>$name, 'value'=>$value));
}
?>
I don’t know if there is a more elegant solution (that doesn’t involve hacking the ditto core) than this, but this is working really well for me.