17 require_once SQ_CORE_PACKAGE_PATH.
'/system/triggers/trigger_condition/trigger_condition.inc';
49 public static function evaluate($settings, &$state)
51 $type_list = Array(0 =>
'GET', 1 =>
'POST', 2 =>
'PUT', 3 =>
'DELETE');
53 return ($_SERVER[
'REQUEST_METHOD'] == $type_list[$settings[
'request_method']]);
68 public static function getInterface($settings, $prefix, $write_access=FALSE)
70 $options = Array(0 =>
'GET', 1 =>
'POST', 2 =>
'PUT', 3 =>
'DELETE');
72 $value = array_get_index($settings,
'request_method',
'GET');
76 combo_box($prefix.
'[request_method]', $options, FALSE, $value);
78 echo
'<b>'.$options[$value].
'</b>';
80 $var = ob_get_contents();
83 return translate(
'trigger_request_method', $var);
99 if (empty($request_data)) {
100 return translate(
'trigger_input_data_error');
103 $settings[
'request_method'] = $request_data[
'request_method'];