• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

payment/bmf/lib/SOAP/class.ilBMFFault.php

Go to the documentation of this file.
00001 <?php
00002 //
00003 // +----------------------------------------------------------------------+
00004 // | PHP Version 4                                                        |
00005 // +----------------------------------------------------------------------+
00006 // | Copyright (c) 1997-2003 The PHP Group                                |
00007 // +----------------------------------------------------------------------+
00008 // | This source file is subject to version 2.02 of the PHP license,      |
00009 // | that is bundled with this package in the file LICENSE, and is        |
00010 // | available at through the world-wide-web at                           |
00011 // | http://www.php.net/license/2_02.txt.                                 |
00012 // | If you did not receive a copy of the PHP license and are unable to   |
00013 // | obtain it through the world-wide-web, please send a note to          |
00014 // | license@php.net so we can mail you a copy immediately.               |
00015 // +----------------------------------------------------------------------+
00016 // | Authors: Shane Caraveo <Shane@Caraveo.com>   Port to PEAR and more   |
00017 // | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author         |
00018 // +----------------------------------------------------------------------+
00019 //
00020 // $Id: class.ilBMFFault.php 11401 2006-07-12 10:40:54Z jconze $
00021 //
00022 require_once('PEAR.php');
00023 
00034 class ilBMFFault extends PEAR_Error
00035 {
00036     
00047     function ilBMFFault($faultstring = 'unknown error', $faultcode = 'Client', $faultactor=NULL, $detail=NULL, $mode = null, $options = null)
00048     {
00049         parent::PEAR_Error($faultstring, $faultcode, $mode, $options, $detail);
00050         if ($faultactor) $this->error_message_prefix = $faultactor;
00051     }
00052     
00061     function message()
00062     {
00063         $msg =& new ilBMFBase();
00064         $params = array();
00065         $params[] =& new ilBMFValue('faultcode', 'QName', 'SOAP-ENV:'.$this->code);
00066         $params[] =& new ilBMFValue('faultstring', 'string', $this->message);
00067         $params[] =& new ilBMFValue('faultactor', 'anyURI', $this->error_message_prefix);
00068         if (isset($this->backtrace)) {
00069             $params[] =& new ilBMFValue('detail', 'string', $this->backtrace);
00070         } else {
00071             $params[] =& new ilBMFValue('detail', 'string', $this->userinfo);
00072         }
00073         
00074         $methodValue =& new ilBMFValue('{'.SOAP_ENVELOP.'}Fault', 'Struct', $params);
00075         $headers = NULL;
00076         return $msg->_makeEnvelope($methodValue, $headers);
00077     }
00078     
00087     function getFault()
00088     {
00089         global $SOAP_OBJECT_STRUCT;
00090         if ($SOAP_OBJECT_STRUCT) {
00091             $fault =& new stdClass();
00092             $fault->faultcode = $this->code;
00093             $fault->faultstring = $this->message;
00094             $fault->faultactor = $this->error_message_prefix;
00095             $fault->detail = $this->userinfo;
00096             return $fault;
00097         }
00098         return array(
00099                 'faultcode' => $this->code,
00100                 'faultstring' => $this->message,
00101                 'faultactor' => $this->error_message_prefix,
00102                 'detail' => $this->userinfo
00103             );
00104     }
00105     
00114     function getActor()
00115     {
00116         return $this->error_message_prefix;
00117     }
00118     
00127     function getDetail()
00128     {
00129         return $this->userinfo;
00130     }
00131     
00132 }
00133 ?>

Generated on Fri Dec 13 2013 11:57:58 for ILIAS Release_3_6_x_branch .rev 46809 by  doxygen 1.7.1