• 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-2002 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 5974 2004-11-24 17:03:42Z smeyer $
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                     new ilBMFValue('faultcode', 'QName', 'SOAP-ENV:'.$this->code),
00066                     new ilBMFValue('faultstring', 'string', $this->message),
00067                     new ilBMFValue('faultactor', 'anyURI', $this->error_message_prefix),
00068                     new ilBMFValue('detail', 'string', $this->userinfo)
00069                 );
00070         $methodValue = new ilBMFValue('{'.SOAP_ENVELOP.'}Fault', 'Struct', $params);
00071         $headers = NULL;
00072         return $msg->_makeEnvelope($methodValue, $headers);
00073     }
00074     
00083     function getFault()
00084     {
00085         global $SOAP_OBJECT_STRUCT;
00086         if ($SOAP_OBJECT_STRUCT) {
00087             $fault = new stdClass();
00088             $fault->faultcode = $this->code;
00089             $fault->faultstring = $this->message;
00090             $fault->faultactor = $this->error_message_prefix;
00091             $fault->detail = $this->userinfo;
00092             return $fault;
00093         }
00094         return array(
00095                 'faultcode' => $this->code,
00096                 'faultstring' => $this->message,
00097                 'faultactor' => $this->error_message_prefix,
00098                 'detail' => $this->userinfo
00099             );
00100     }
00101     
00110     function getActor()
00111     {
00112         return $this->error_message_prefix;
00113     }
00114     
00123     function getDetail()
00124     {
00125         return $this->userinfo;
00126     }
00127     
00128 }
00129 ?>

Generated on Fri Dec 13 2013 09:06:37 for ILIAS Release_3_4_x_branch .rev 46804 by  doxygen 1.7.1