Public Member Functions

ilBMFFault Class Reference

Inheritance diagram for ilBMFFault:
Collaboration diagram for ilBMFFault:

Public Member Functions

 ilBMFFault ($faultstring= 'unknown error', $faultcode= 'Client', $faultactor=NULL, $detail=NULL, $mode=null, $options=null)
 Constructor.
 message ()
 message
 getFault ()
 getFault
 getActor ()
 getActor
 getDetail ()
 getDetail

Detailed Description

Definition at line 34 of file class.ilBMFFault.php.


Member Function Documentation

ilBMFFault::getActor (  ) 

getActor

returns the SOAP actor for the fault

Returns:
string public

Definition at line 110 of file class.ilBMFFault.php.

    {
        return $this->error_message_prefix;
    }

ilBMFFault::getDetail (  ) 

getDetail

returns the fault detail

Returns:
string public

Definition at line 123 of file class.ilBMFFault.php.

    {
        return $this->userinfo;
    }

ilBMFFault::getFault (  ) 

getFault

returns a simple native php array containing the fault data

Returns:
array public

Definition at line 83 of file class.ilBMFFault.php.

References message().

    {
        global $SOAP_OBJECT_STRUCT;
        if ($SOAP_OBJECT_STRUCT) {
            $fault = new stdClass();
            $fault->faultcode = $this->code;
            $fault->faultstring = $this->message;
            $fault->faultactor = $this->error_message_prefix;
            $fault->detail = $this->userinfo;
            return $fault;
        }
        return array(
                'faultcode' => $this->code,
                'faultstring' => $this->message,
                'faultactor' => $this->error_message_prefix,
                'detail' => $this->userinfo
            );
    }

Here is the call graph for this function:

ilBMFFault::ilBMFFault ( faultstring = 'unknown error',
faultcode = 'Client',
faultactor = NULL,
detail = NULL,
mode = null,
options = null 
)

Constructor.

Parameters:
string message string for fault
mixed the faultcode
mixed see PEAR::ERROR
mixed see PEAR::ERROR
array the userinfo array is used to pass in the SOAP actor and detail for the fault

Definition at line 47 of file class.ilBMFFault.php.

    {
        parent::PEAR_Error($faultstring, $faultcode, $mode, $options, $detail);
        if ($faultactor) $this->error_message_prefix = $faultactor;
    }

ilBMFFault::message (  ) 

message

returns a SOAP_Message class that can be sent as a server response

Returns:
SOAP_Message public

Definition at line 61 of file class.ilBMFFault.php.

Referenced by getFault().

    {
        $msg = new ilBMFBase();
        $params = array(
                    new ilBMFValue('faultcode', 'QName', 'SOAP-ENV:'.$this->code),
                    new ilBMFValue('faultstring', 'string', $this->message),
                    new ilBMFValue('faultactor', 'anyURI', $this->error_message_prefix),
                    new ilBMFValue('detail', 'string', $this->userinfo)
                );
        $methodValue = new ilBMFValue('{'.SOAP_ENVELOP.'}Fault', 'Struct', $params);
        $headers = NULL;
        return $msg->_makeEnvelope($methodValue, $headers);
    }

Here is the caller graph for this function:


The documentation for this class was generated from the following file: