Class Sms

(line 19)
Base
   |
   --Sms

Located in File: Program_Root/sdk/protocol/Sms.php


$Id: Sms.php,v 1.1.1.1 2003/03/27 10:27:42 maro Exp $

This class represents an SMS.

Use getter methods to retrieve information about the message.


Class Variable Summary
$STATUS_REPORT_NO
Default Value: -> "false"<-
$STATUS_REPORT_YES
Default Value: -> "true"<-
$__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
Variable Default Value Description
Base::$clazz -> <-
Base::$logFile -> _DEBUG_FILE <-
Base::$loglevel -> _DEBUG_LEVEL <- debug - logstatements above and including 'debug' are printed.
Base::$loglevels ->array ("debug" => 0, "info" => 1, "warn" => 2, "fatal" => 3) <-
Base::$logoutput -> _DEBUG_OUTPUT <- 0 - log to screen
Base::$method -> <-

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
Function Description
Base::Base()
Base::dbg()
Base::formatLongDate()
Base::formatLongDateTime()
Base::formatShortDate()
Base::formatShortDateTime()
Base::logDebug()
Base::logFatal()
Base::logInfo()
Base::logWarn()
Base::registerClass()
Base::registerMethod()
Base::setLoglevel()
Base::toFile()
Base::toScreen()

Method Detail

Constructor Sms

(line 51)

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'.

Function Parameters:
- string $to: mobilephonenumber (recipient)
- string $message: the message
Function Info:
see - Sms::setStatusReporting()

[ Top ]


getDelivered

(line 125)

string getDelivered( )

Returns the date the SMS was delivered to the gateway.
Function Info:
return - date-delivered.

[ Top ]


getFrom

(line 105)

string getFrom( )

Returns the originator for this SMS.
Function Info:
return - originator

[ Top ]


getMessage

(line 110)

string getMessage( )

Returns the message-text for this SMS.
Function Info:
return - message

[ Top ]


getStatusReporting

(line 120)

string getStatusReporting( )

Returns 'true/false' if statusreporting is enabled for this SMS.
Function Info:
return - 'true' or 'false'

[ Top ]


getTo

(line 100)

string getTo( )

Returns the recipient for this SMS
Function Info:
return - recipient

[ Top ]


getValidTo

(line 115)

string getValidTo( )

Returns the valid-to date for this message
Function Info:
return - valid-to date

[ Top ]


setDelivered

(line 87)

void setDelivered( string $delivered)

Sets the date the SMS was delivered, only used by the gateway.
Function Parameters:
- string $delivered: string representing a date formatted like 'yyyy-mm-dd hh:mm:ss'
Function Info:

[ Top ]


setFrom

(line 69)

void setFrom( string $from)

Sets the originator mobilephonenumber. Note that the settings in the gateway may override the originator.
Function Parameters:
- string $from: originator name or phone-number.
Function Info:

[ Top ]


setMessage

(line 92)

void setMessage( string $message)

Sets the text for this SMS.
Function Parameters:
- string $message: the SMS text.
Function Info:

[ Top ]


setStatusReporting

(line 76)

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.

Function Parameters:
- string $status: true or false
Function Info:

[ Top ]


setTo

(line 63)

void setTo( string $to)

Sets the recipient mobilephonenumber.
Function Parameters:
- string $to: the mobilephone number.
Function Info:

[ Top ]


setValidTo

(line 82)

void setValidTo( string $valid)

If the recipient is unreachable, the validTo date specifies how long the SMSc should continue trying to deliver the SMS.
Function Parameters:
- string $valid: string representing a date formatted like 'yyyy-mm-dd hh:mm:ss'
Function Info:

[ Top ]


validateMessage

(line 149)

void validateMessage( )


Function Info:

[ Top ]


validateMobile

(line 127)

void validateMobile( )


Function Info:

[ Top ]



Variable Detail

$STATUS_REPORT_NO

(line 23)
Data type: mixed

[ Top ]

$STATUS_REPORT_YES

(line 22)
Data type: mixed

[ Top ]

$__delivered

(line 40)
Data type: mixed
Date reported by the SMSc when the SMS was delivered

Format [yyyy-mm-dd hh:mm:ss]

[ Top ]

$__from

(line 26)
Data type: mixed
SMS from, originator of message

[ Top ]

$__message

(line 30)
Data type: mixed
SMS text

[ Top ]

$__statusReporting

(line 32)
Data type: mixed
If status reporting for this message is wanted, string ("true"/"false")

[ Top ]

$__to

(line 28)
Data type: mixed
SMS recipient

[ Top ]

$__validTo

(line 36)
Data type: mixed
Specifies the date when the SMSc should stop try to deliver the

message. [yyyy-mm-dd hh:mm:ss]

[ Top ]



Documention generated on Mon, 31 Mar 2003 10:17:47 +0200 by phpDocumentor 1.2.0rc1