Class SendResponse

(line 18)
Base
   |
   --SendResponse

Located in File: Program_Root/sdk/protocol/send/SendResponse.php


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

This class represents a Response on a sent SMS message received from the gateway.


Class Variable Summary
$STATUS_FAIL
Constant for defining this Response as failed.
Default Value: -> "fail"<-
$STATUS_SUCCESS
Constant for defining this Response as successful
Default Value: -> "success"<-
$__currentTag
Current tag when processing the XML
Default Value: -><-
$__errorCode
Error code for the Response
Default Value: -><-
$__errorMsg
Error message for the Response
Default Value: -><-
$__messageId
Message id for this Response
Default Value: -><-
$__raw
Raw data representing the Response (XML)
Default Value: -><-
$__status
Status of the Response
Default Value: -><-
$__type
Type of Response
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 SendResponse ( [$xml = ""] )
Creates a new SendResponse, if param $xml is provided the response is parsed. If $xml is omitted, an empty SendResponse is created.
void characterData ( $parser, $data )
void endElement ( $parser, $name )
int getErrorCode ( )
Returns the error-code for the message if unsuccessful send.
string getErrorMessage ( )
Returns the error-message for the message if unsuccessful send.
string getMessageId ( )
Returns the message-id for the message if successful send.
string getResponseType ( )
Returns the response-type for the sent message
string getStatus ( )
Returns the status of the response which is one of STATUS_SUCCESS or STATUS_FAIL.
void parse ( )
Parses the response from the gateway.
void parseAttributes ( $attrs )
Parses the attributes for the current tag
void setErrorCode ( $code )
Sets the error-code for the message in case of failure.
void setErrorMessage ( $msg )
Sets the error-message for the message in case of failure.
void setMessageId ( $id )
Sets the message-id for the message
void setResponseType ( $type )
Sets the response type for the message
void setStatus ( $status )
Sets the status of the response
void startElement ( $parser, $name, $attrs )
string toXML ( )
Serializes the response into an XML string.
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 SendResponse

(line 48)

void SendResponse( [string $xml = ""])

Creates a new SendResponse, if param $xml is provided the response is parsed. If $xml is omitted, an empty SendResponse is created.
Function Parameters:
- string $xml: optional response from gateway.
Function Info:

[ Top ]


characterData

(line 178)

void characterData( mixed $parser, mixed $data)


Function Info:

[ Top ]


endElement

(line 173)

void endElement( mixed $parser, mixed $name)


Function Info:

[ Top ]


getErrorCode

(line 82)

int getErrorCode( )

Returns the error-code for the message if unsuccessful send.
Function Info:

[ Top ]


getErrorMessage

(line 87)

string getErrorMessage( )

Returns the error-message for the message if unsuccessful send.
Function Info:

[ Top ]


getMessageId

(line 77)

string getMessageId( )

Returns the message-id for the message if successful send.
Function Info:

[ Top ]


getResponseType

(line 92)

string getResponseType( )

Returns the response-type for the sent message
Function Info:

[ Top ]


getStatus

(line 64)

string getStatus( )

Returns the status of the response which is one of STATUS_SUCCESS or STATUS_FAIL.
Function Info:
return - status

[ Top ]


parse

(line 142)

void parse( )

Parses the response from the gateway.
Function Info:

[ Top ]


parseAttributes

(line 187)

void parseAttributes( mixed $attrs)

Parses the attributes for the current tag
Function Info:

[ Top ]


setErrorCode

(line 115)

void setErrorCode( int $code)

Sets the error-code for the message in case of failure.
Function Parameters:
- int $code: code
Function Info:

[ Top ]


setErrorMessage

(line 120)

void setErrorMessage( string $msg)

Sets the error-message for the message in case of failure.
Function Parameters:
- string $msg:
Function Info:

[ Top ]


setMessageId

(line 110)

void setMessageId( string $id)

Sets the message-id for the message
Function Parameters:
- string $id:
Function Info:

[ Top ]


setResponseType

(line 100)

void setResponseType( string $type)

Sets the response type for the message
Function Parameters:
- string $type:
Function Info:

[ Top ]


setStatus

(line 105)

void setStatus( string $status)

Sets the status of the response
Function Parameters:
- string $status:
Function Info:

[ Top ]


startElement

(line 167)

void startElement( mixed $parser, mixed $name, mixed $attrs)


Function Info:

[ Top ]


toXML

(line 126)

string toXML( )

Serializes the response into an XML string.
Function Info:

[ Top ]



Variable Detail

$STATUS_FAIL

(line 26)
Data type: mixed
Constant for defining this Response as failed.

[ Top ]

$STATUS_SUCCESS

(line 23)
Data type: mixed
Constant for defining this Response as successful

[ Top ]

$__currentTag

(line 41)
Data type: mixed
Current tag when processing the XML

[ Top ]

$__errorCode

(line 37)
Data type: mixed
Error code for the Response

[ Top ]

$__errorMsg

(line 39)
Data type: mixed
Error message for the Response

[ Top ]

$__messageId

(line 33)
Data type: mixed
Message id for this Response

[ Top ]

$__raw

(line 29)
Data type: mixed
Raw data representing the Response (XML)

[ Top ]

$__status

(line 35)
Data type: mixed
Status of the Response

[ Top ]

$__type

(line 31)
Data type: mixed
Type of Response

[ Top ]



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