public function setConfig($config)
    {
        if (!is_array($config) || !isset($config['callback'])) {
            $config = array('callback' => $config);
        }
        if (!is_callable($config['callback'], false, $callbackName)) {
            throw new HTML_QuickForm2_InvalidArgumentException(
                'Callback Rule requires a valid callback, \'' . $callbackName .
                '\' was given'
            );
        }
        return parent::setConfig($config + array('arguments' => array()));
    }
public function setConfig($config)
    {
        if (!is_array($config) || !isset($config['callback'])) {
            $config = array('callback' => $config);
        }
        if (!is_callable($config['callback'], false, $callbackName)) {
            throw new HTML_QuickForm2_InvalidArgumentException(
                'Callback Rule requires a valid callback, \'' . $callbackName .
                '\' was given'
            );
        }
        return parent::setConfig($config + array('arguments' => array()));
    }
public function setConfig ( $ config ) { if ( ! is_array ( $ config ) || ! isset ( $ config [ 'callback' ] ) ) { $ config = array ( 'callback' => $ config ) ; } if ( ! is_callable ( $ config [ 'callback' ] , false , $ callbackName ) ) { throw new HTML_QuickForm2_InvalidArgumentException ( 'Callback Rule requires a valid callback, \'' . $ callbackName . '\' was given' ) ; } return parent :: setConfig ( $ config + array ( 'arguments' => array ( ) ) ) ; }
Sets the callback to use for validation and its additional arguments

@param    callback|array  Callback or array ('callback' => validation callback,
'arguments' => additional arguments)
@return   HTML_QuickForm2_Rule
@throws   HTML_QuickForm2_InvalidArgumentException if callback is missing or invalid
Sets the callback to use for validation and its additional arguments