Advertisement
Guest User

Untitled

a guest
Jul 26th, 2010
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. function classFunction($param) {
  2.  
  3.     static $soapServer = null;
  4.  
  5.     if(!isset($soapServer)){
  6.         $soapServer = $param;        
  7.     } else {
  8.         $soapServer->fault(0, $param->getMessage());
  9.     }
  10. }
  11.  
  12. $ss = new SoapServer();
  13. //первыи вызов - конструктор
  14. classFunction($ss);
  15.  
  16. try {
  17.     //...
  18. } catch (Exception $e) {
  19.     classFunction($e);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement