Methods summary
public
|
#
__construct( array $options = array() )
Contructor
Possible settings:
'userkey' => usekey (required) 'password' => password (required)
'originator'=> originator (required) 'affiliateid'=> affiliate id
(optional) 'urls' => callback urls, assoc array of urls (a.s.
setCallbackURL())
Parameters
- $options
array $options Associative array of generic settings
See
|
public
tschiemer\Aspsms\Request
|
|
public
tschiemer\Aspsms\Response
|
|
public
|
|
public
Aspsms\AbstractSimpleClient
|
#
setAuth( string $userkey, string $password )
Sets default authentication details.
Sets default authentication details.
Parameters
- $userkey
string $userkey
- $password
string $password
Returns
Aspsms\AbstractSimpleClient
|
public
string
|
|
public
Aspsms\AbstractSimpleClient
|
#
setOriginator( string $originator )
Sets default originator.
Parameters
- $originator
string $originator
Returns
Aspsms\AbstractSimpleClient
|
public
string
|
#
getAffiliateId( )
Gets default affiliate id.
Gets default affiliate id.
Returns
string
|
public
Aspsms\AbstractSimpleClient
|
#
setAffiliateId( string $affiliateId = '' )
Sets default affiliate id.
Sets default affiliate id.
Parameters
- $affiliateId
string $affiliateId
Returns
Aspsms\AbstractSimpleClient
|
public
string|array
|
#
getCallbackURL( null|string $type = NULL )
Get current default notification URL.
Get current default notification URL.
Parameters
Returns
string|array Returns string/url IFF <$type> given, array with all urls otherwise.
|
public
Aspsms\AbstractSimpleClient
|
#
setCallbackURL( string $type, string $url )
Sets default callback urls
Sets default callback urls
1. simple: SMS.URLNonDeliveryNotification =
"http://www.mysite.com/sms/notdelivered.asp?ID=" When the
TransactionReferenceNumber is e.g. 3152, the URL will be loaded like this: http://www.mysite.com/sms/notdelivered.asp?ID=3152
2. detailed: http://www.yourhost.com/Delivered.asp?SCTS=<SCTS>&DSCTS=<DSCTS>&RSN=<RSN>&DST=<DST>&TRN=<TRN>
<RCPNT> (Recipient, Mobilenumber) <SCTS> (Servicecenter Timestamp,
Submissiondate) <DSCTS> (Delivery Servicecenter Timestamp,
Notificationdate) <RSN> (Reasoncode) <DST> (Deliverystatus)
<TRN> (Transactionreferencenummer)
Parameters
- $type
string $type 'success'/'URLDeliveryNotification', 'error'/'URLNonDeliveryNotification',
'buffered'/'URLBufferedMessageNotification'
- $url
string $url
Returns
Aspsms\AbstractSimpleClient
|
public
float
|
#
getCreditBalance( )
Request: what's the current balance?
Request: what's the current balance?
Returns
float
|
public
boolean
|
#
checkOriginator( null|string $originator = NULL )
Request: Is (numeric) originator valid, can it be used respectively?
Request: Is (numeric) originator valid, can it be used respectively?
Parameters
- $originator
null|string $originator
Returns
boolean
|
public
type
|
#
requestOriginatorUnlockCode( string $originator = NULL )
Request: request a code to unlock numeric originator. An SMS with the code is
sent to the given (or set) originator.
Request: request a code to unlock numeric originator. An SMS with the code is
sent to the given (or set) originator.
Parameters
- $originator
string $originator Must be numeric
Returns
type
|
public
|
#
unlockOriginator( type $code, type $originator = NULL )
Request: Attempt to unlock (numeric) originator with code.
Request: Attempt to unlock (numeric) originator with code.
Parameters
- $code
type $code
- $originator
type $originator
See
|
public
|
#
getDeliveryStatus( string|array $trackingNumbers, boolean $index_by_nr = TRUE, array $keys = array() )
Request: get delivery status of tracking
Request: get delivery status of tracking
Returns array of delivery statuses.
If $index_by_nr == TRUE formatted as (only last the last result foreach
ref-nr): array( 'REF-NR-1' => array($keys[0] => 'REF-NR-1', $keys[1] =>
'..', .. , $keys[6] => '..'), 'REF-NR-2' => array($keys[0] =>
'REF-NR-2', $keys[1] => '..', .. , $keys[6] => '..'), 'REF-NR-3' =>
array($keys[0] => 'REF-NR-3', $keys[1] => '..', .. , $keys[6] => '..')
.. )
Else (with possible ref-nr duplicates):
array( array($keys[0] => 'REF-NR-1', $keys[1] => '..', .. , $keys[6] =>
'..'), array($keys[0] => 'REF-NR-1', $keys[1] => '..', .. , $keys[6] =>
'..'), array($keys[0] => 'REF-NR-2', $keys[1] => '..', .. , $keys[6] =>
'..') .. )
Parameters
- $trackingNumbers
string|array $trackingNumbers
- $index_by_nr
boolean $index_by_nr Index result set by reference number (TRUE)? or just return
complete list of results (FALSE)?
- $keys
array $keys Delivery Status field names to use
|
public
boolean
|
#
sendText( array,string $recipients, string $text )
Request: send Text sms
String Format: ("<RECIPIENT_NR>" + {":<TRACKING_NR>"} ";" .. )+
Eg: 00417777777 00417777777;00417777777;004177777777
00417777777:84612004;00417777777:74183874783
Array Format: <TRACKING_NR> => <RECIPIENT_NR>
Parameters
- $recipients
array,string $recipients
- $text
string $text
Returns
boolean Request success? (not delivery success)
See
\Aspsms\AbstractSimpleClient::getDeliveryStatus()
|
public
string
|
#
sendWapPush( array, $recipients, string $url, string $description = '' )
Request: send WAP push
String Format: ("<RECIPIENT_NR>" + {":<TRACKING_NR>"} ";" .. )+
Eg: 00417777777 00417777777;00417777777;004177777777
00417777777:84612004;00417777777:74183874783
Array Format: <TRACKING_NR> => <RECIPIENT_NR>
Parameters
- $recipients
array, string $recipients
- $url
string $url
- $description
string $description
Returns
string request success? (not delivery success))
See
\Aspsms\AbstractSimpleClient::getDeliveryStatus()
|
public
Aspsms\AbstractSimpleClient
|
#
flash( boolean $on_off = TRUE )
Use flashing SMS?
Parameters
Returns
Aspsms\AbstractSimpleClient
|
public
Aspsms\AbstractSimpleClient
|
#
deferTime( integer $seconds, integer|DateTimeZone $timezone = 0 )
Delay delivery of SMS by <$seconds>
Delay delivery of SMS by <$seconds>
Parameters
- $seconds
integer $seconds
- $timezone
integer|DateTimeZone $timezone, if int: offset to GMT
Returns
Aspsms\AbstractSimpleClient
|
public
Aspsms\AbstractSimpleClient
|
#
deferUntil( string|DateTime $date, integer|DateTimeZone $timezone = 0 )
Set approximate delivery of SMS to <$date>
Set approximate delivery of SMS to <$date>
Parameters
Returns
Aspsms\AbstractSimpleClient
|
public
Aspsms\AbstractSimpleClient
|
#
callbacks( array,string $urls = array(), NULL,string $to = NULL )
Sets callback URLS.
Example calls:
$client->callbacks(array('success'=>'http://...','error'=>'http://..'));
$client->callbacks('success' => 'http://..');
Parameters
- $urls
array,string $urls
- $to
NULL,string $to
Returns
Aspsms\AbstractSimpleClient
See
|
public
Aspsms\Soap\v2\SimpleClient
|
#
set( string|array $key_or_array = NULL, null|mixed $value = NULL )
Sets any request option for current/next request.
Sets any request option for current/next request.
Parameters
- $key_or_array
string|array $key_or_array
- $value
null|mixed $value
Returns
Aspsms\Soap\v2\SimpleClient
Throws
|
public
Aspsms\AbstractSimpleClient
|
#
clear( )
Clear any message settings set through <set()> for current/next
request.
Clear any message settings set through <set()> for current/next
request.
Returns
Aspsms\AbstractSimpleClient
See
|
abstract public
tschiemer\Aspsms\AbstractClient
|
#
driver( mixed & $request )
Get driver to actually submit request.
Get driver to actually submit request.
Returns
|
public
mixed
|
#
send( array $options = array() )
Parameters
Returns
mixed
Throws
See
\Aspsms\AbstractClient
|