Base | --Sms
Located in File: Program_Root/sdk/protocol/Sms.php
This class represents an SMS.
Use getter methods to retrieve information about the message.
Magnus Rosenquist, Zyneo
Class Variable Summary |
$STATUS_REPORT_NO
Default Value:
|
$STATUS_REPORT_YES
Default Value:
|
$__delivered
Date reported by the SMSc when the SMS was delivered Default Value:
|
$__from
SMS from, originator of message Default Value:
|
$__message
SMS text Default Value:
|
$__statusReporting
If status reporting for this message is wanted, string ("true"/"false") Default Value:
|
$__to
SMS recipient Default Value:
|
$__validTo
Specifies the date when the SMSc should stop try to deliver the Default Value:
|
Inherited Class Variable Summary | |||||||||||||||||||||
Inherited From Class Base
|
Method Summary |
void constructor Sms ( [$to = ""], [$message = ""] )
Creates a new Sms object with a default to-address (recipient) and a message to be sent. |
string getDelivered ( )
Returns the date the SMS was delivered to the gateway. |
string getFrom ( )
Returns the originator for this SMS. |
string getMessage ( )
Returns the message-text for this SMS. |
string getStatusReporting ( )
Returns 'true/false' if statusreporting is enabled for this SMS. |
string getTo ( )
Returns the recipient for this SMS |
string getValidTo ( )
Returns the valid-to date for this message |
void setDelivered ( $delivered )
Sets the date the SMS was delivered, only used by the gateway. |
void setFrom ( $from )
Sets the originator mobilephonenumber. Note that the settings in the gateway may override the originator. |
void setMessage ( $message )
Sets the text for this SMS. |
void setStatusReporting ( $status )
Sets if Notifications should be returned for this SMS, defaults to 'false'. |
void setTo ( $to )
Sets the recipient mobilephonenumber. |
void setValidTo ( $valid )
If the recipient is unreachable, the validTo date specifies how long the SMSc should continue trying to deliver the SMS. |
void validateMessage ( )
|
void validateMobile ( )
|
Inherited Method Summary |
Inherited From Class Base
|
Method Detail |
void Sms( [string $to = ""], [string $message = ""])
Creates a new Sms object with a default to-address (recipient) and a message to be sent.Statusreporting is by default set to 'false'. If statusreports are required you have to set statusreporting to 'true'.
- string $to: mobilephonenumber (recipient)
- string $message: the message
Sms::setStatusReporting()
[ Top ]
string getDelivered( )
Returns the date the SMS was delivered to the gateway.date-delivered.
[ Top ]
string getFrom( )
Returns the originator for this SMS.originator
[ Top ]
string getMessage( )
Returns the message-text for this SMS.message
[ Top ]
string getStatusReporting( )
Returns 'true/false' if statusreporting is enabled for this SMS.'true' or 'false'
[ Top ]
string getTo( )
Returns the recipient for this SMSrecipient
[ Top ]
string getValidTo( )
Returns the valid-to date for this messagevalid-to date
[ Top ]
void setDelivered( string $delivered)
Sets the date the SMS was delivered, only used by the gateway.- string $delivered: string representing a date formatted like 'yyyy-mm-dd hh:mm:ss'
[ Top ]
void setFrom( string $from)
Sets the originator mobilephonenumber. Note that the settings in the gateway may override the originator.- string $from: originator name or phone-number.
[ Top ]
void setMessage( string $message)
Sets the text for this SMS.- string $message: the SMS text.
[ Top ]
void setStatusReporting( string $status)
Sets if Notifications should be returned for this SMS, defaults to 'false'.Note that not all providers in the gateway can deliver status-reports. Use params STATUS_REPORT_YES and STATUS_REPORT_NO to set valid status.
- string $status: true or false
[ Top ]
void setTo( string $to)
Sets the recipient mobilephonenumber.- string $to: the mobilephone number.
[ Top ]
void setValidTo( string $valid)
If the recipient is unreachable, the validTo date specifies how long the SMSc should continue trying to deliver the SMS.- string $valid: string representing a date formatted like 'yyyy-mm-dd hh:mm:ss'
[ Top ]
void validateMessage( )
[ Top ]
void validateMobile( )
[ Top ]
Variable Detail |
[ Top ]
[ Top ]
Format [yyyy-mm-dd hh:mm:ss]
[ Top ]
[ Top ]
[ Top ]
[ Top ]
[ Top ]
message. [yyyy-mm-dd hh:mm:ss]
[ Top ]