ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilBMFFault.php
Go to the documentation of this file.
1<?php
26require_once('PEAR.php');
27
38{
39
50 function ilBMFFault($faultstring = 'unknown error', $faultcode = 'Client', $faultactor=NULL, $detail=NULL, $mode = null, $options = null)
51 {
52 parent::PEAR_Error($faultstring, $faultcode, $mode, $options, $detail);
53 if ($faultactor) $this->error_message_prefix = $faultactor;
54 }
55
64 function message()
65 {
66 $msg =& new ilBMFBase();
67 $params = array();
68 $params[] =& new ilBMFValue('faultcode', 'QName', 'SOAP-ENV:'.$this->code);
69 $params[] =& new ilBMFValue('faultstring', 'string', $this->message);
70 $params[] =& new ilBMFValue('faultactor', 'anyURI', $this->error_message_prefix);
71 if (isset($this->backtrace)) {
72 $params[] =& new ilBMFValue('detail', 'string', $this->backtrace);
73 } else {
74 $params[] =& new ilBMFValue('detail', 'string', $this->userinfo);
75 }
76
77 $methodValue =& new ilBMFValue('{'.SOAP_ENVELOP.'}Fault', 'Struct', $params);
78 $headers = NULL;
79 return $msg->_makeEnvelope($methodValue, $headers);
80 }
81
90 function getFault()
91 {
92 global $SOAP_OBJECT_STRUCT;
93 if ($SOAP_OBJECT_STRUCT) {
94 $fault =& new stdClass();
95 $fault->faultcode = $this->code;
96 $fault->faultstring = $this->message;
97 $fault->faultactor = $this->error_message_prefix;
98 $fault->detail = $this->userinfo;
99 return $fault;
100 }
101 return array(
102 'faultcode' => $this->code,
103 'faultstring' => $this->message,
104 'faultactor' => $this->error_message_prefix,
105 'detail' => $this->userinfo
106 );
107 }
108
117 function getActor()
118 {
120 }
121
130 function getDetail()
131 {
132 return $this->userinfo;
133 }
134
135}
136?>
$error_message_prefix
Definition: PEAR.php:830
const SOAP_ENVELOP
getActor()
getActor
ilBMFFault($faultstring='unknown error', $faultcode='Client', $faultactor=NULL, $detail=NULL, $mode=null, $options=null)
Constructor.
getFault()
getFault
message()
message
getDetail()
getDetail
$params
Definition: example_049.php:96
if(!is_array($argv)) $options