function sms_devel_virtualgw_log_insert in SMS Framework 7
Same name and namespace in other branches
- 6.2 modules/sms_devel/sms_devel.virtualgw.inc \sms_devel_virtualgw_log_insert()
- 6 modules/sms_devel/sms_devel.virtualgw.inc \sms_devel_virtualgw_log_insert()
Writes incoming and outgoing messages to the log.
Parameters
string $type: The message type (incoming or outgoing).
string $number: The sender numbers.
string $message: The message received.
array $options: Array of options.
Return value
boolean true if logging was successful, false otherwise.
2 calls to sms_devel_virtualgw_log_insert()
- sms_devel_virtualgw_receiver in modules/
sms_devel/ sms_devel.virtualgw.inc - Handles incoming messages.
- sms_devel_virtualgw_send in modules/
sms_devel/ sms_devel.virtualgw.inc - Callback for sending messages.
File
- modules/
sms_devel/ sms_devel.virtualgw.inc, line 111 - Virtual Gateway for the sms_devel module of the SMS Framework.
Code
function sms_devel_virtualgw_log_insert($type, $number = '', $message = '', $options = array()) {
$options_z = serialize($options);
$result = $id = db_insert('sms_devel_virtualgw')
->fields(array(
'created' => REQUEST_TIME,
'type' => $type,
'number' => $number,
'message' => $message,
'options' => $options_z,
))
->execute();
return $result;
}