Abstract class for SMS drivers. More...
Public Member Functions | |
set_hostname ($hostname) | |
Sets hostname of gate. | |
set_user ($user) | |
Sets user to gate. | |
set_password ($password) | |
Sets password to gate. | |
set_test ($test) | |
Sets test (no SMS are sended, just states are made). | |
get_status () | |
Gets state of message. | |
get_error () | |
Gets error report. | |
test_conn () | |
Test if connection to server is OK. | |
send ($sender, $recipient, $message) | |
Try to send SMS messages. | |
receive () | |
Try to receive SMS messages. | |
get_received_messages () | |
Gets recieved messages after receive. |
Static Public Member Functions | |
static | factory ($driver) |
Factory for SMS drivers. | |
static | get_driver_name ($driver, $with_help=FALSE) |
Gets name of driver. | |
static | get_drivers () |
Gets drivers array. | |
static | get_active_drivers () |
Gets list of active drivers for selectboxes. | |
static | has_active_driver () |
Check if there are any active drivers. | |
static | enabled () |
Checks if SMS are enabled on server. |
Public Attributes | |
const | DRIVER_CLASS_PREFIX = 'Sms_' |
const | DRIVER_INACTIVE = 1 |
const | DRIVER_ACTIVE = 2 |
const | SOUNDWINV100 = 2 |
const | KLIKNIAVOLEJ = 3 |
Protected Member Functions | |
__construct () | |
Construct cannot be called from outside. |
Protected Attributes | |
$hostname | |
$user | |
$password |
Abstract class for SMS drivers.
|
static |
Checks if SMS are enabled on server.
|
static |
|
static |
Gets list of active drivers for selectboxes.
Key is id of driver and value is name.
|
static |
Gets name of driver.
integer | $driver | String index of driver or integer ID of driver. |
boolean | $with_help | Should contain name help as well [optional] |
|
static |
Gets drivers array.
|
abstract |
Gets error report.
Reimplemented in Sms_Soudvinv100, and Sms_Klikniavolej.
|
abstract |
Gets recieved messages after receive.
Reimplemented in Sms_Klikniavolej, and Sms_Soudvinv100.
|
abstract |
Gets state of message.
Reimplemented in Sms_Soudvinv100, and Sms_Klikniavolej.
|
static |
Check if there are any active drivers.
|
abstract |
Try to receive SMS messages.
Reimplemented in Sms_Klikniavolej, and Sms_Soudvinv100.
|
abstract |
Try to send SMS messages.
string | $sender | Sender of message |
string | $recipient | Recipier of message |
string | $message | Text of message |
Reimplemented in Sms_Soudvinv100, and Sms_Klikniavolej.
Sms::set_hostname | ( | $hostname | ) |
Sms::set_password | ( | $password | ) |
Sets password to gate.
string | $password |
Sms::set_test | ( | $test | ) |
Sets test (no SMS are sended, just states are made).
Do nothing by default.
bool | $test |
Reimplemented in Sms_Klikniavolej.
Sms::set_user | ( | $user | ) |
Sets user to gate.
string | $user |
|
abstract |
Test if connection to server is OK.
Reimplemented in Sms_Klikniavolej, and Sms_Soudvinv100.