public function calculate(&$total, $data, &$components, array $price_rule)
    {
        try {
            $callback = Handler::get($this->getTypes(), $price_rule['value_type'], 'calculate');
            call_user_func_array($callback, array(&$total, &$components, $price_rule, $data));
        } catch (Exception $ex) {
            trigger_error($ex->getMessage());
        }
    }
public function calculate(&$total, $data, &$components, array $price_rule)
    {
        try {
            $callback = Handler::get($this->getTypes(), $price_rule['value_type'], 'calculate');
            call_user_func_array($callback, array(&$total, &$components, $price_rule, $data));
        } catch (Exception $ex) {
            trigger_error($ex->getMessage());
        }
    }
public function calculate ( & $ total , $ data , & $ components , array $ price_rule ) { try { $ callback = Handler :: get ( $ this -> getTypes ( ) , $ price_rule [ 'value_type' ] , 'calculate' ) ; call_user_func_array ( $ callback , array ( & $ total , & $ components , $ price_rule , $ data ) ) ; } catch ( Exception $ ex ) { trigger_error ( $ ex -> getMessage ( ) ) ; } }
Calculate a price rule
@param int $total
@param array $data
@param array $components
@param array $price_rule
Calculate a price rule