public function applyHandler($helper, $method, $name, $value, array $options = array())
{
if (!(isset($this->_handlers[$name]) && ($handler = $this->_handlers[$name]))) {
return $value;
}
switch (true) {
case is_string($handler) && !$helper:
$helper = $this->helper('html');
case is_string($handler) && is_object($helper):
return $helper->invokeMethod($handler, array($value, $method, $options));
case is_array($handler) && is_object($handler[0]):
list($object, $func) = $handler;
return $object->invokeMethod($func, array($value, $method, $options));
case is_callable($handler):
return $handler($value, array($helper, $method), $options);
default:
return $value;
}
}