text; $number = $message->recipient; $gateway = (array)$message->gateway; //convert to array, as it was expected in v1 $options = $message->gateway->options; foreach (module_implements('sms_send') as $module) { $function = $module .'_sms_send'; $function($number, $text, $options, $gateway); } break; case 'pre receive': $op2 = 'pre process'; case 'receive': if (!isset($op2)) $op2 = 'process'; case 'post receive': if (!isset($op2)) $op2 = 'post process'; $number = $message->sender; $text = $message->text; $options = (array)$message;// convert to array, because $options was expected this way module_invoke_all('sms_incoming', $op2, $number, $text, $options); break; } }