ILIAS  release_4-4 Revision
ilBMFTransport Class Reference
+ Collaboration diagram for ilBMFTransport:

Public Member Functions

getTransport ($url, $encoding=SOAP_DEFAULT_ENCODING)
 

Detailed Description

Definition at line 36 of file class.ilBMFTransport.php.

Member Function Documentation

◆ getTransport()

& ilBMFTransport::getTransport (   $url,
  $encoding = SOAP_DEFAULT_ENCODING 
)

Definition at line 38 of file class.ilBMFTransport.php.

References $res, $t, and ilBMFBase_Object\_raiseSoapFault().

Referenced by ilBMFClient\call().

39  {
40  $urlparts = @parse_url($url);
41 
42  if (!$urlparts['scheme']) {
43  $fault = ilBMFBase_Object::_raiseSoapFault("Invalid transport URI: $url");
44  return $fault;
45  }
46 
47  if (strcasecmp($urlparts['scheme'], 'mailto') == 0) {
48  $transport_type = 'SMTP';
49  } elseif (strcasecmp($urlparts['scheme'], 'https') == 0) {
50  $transport_type = 'HTTP';
51  } else {
52  /* handle other transport types */
53  $transport_type = strtoupper($urlparts['scheme']);
54  }
55  $transport_include = dirname(__FILE__).'/Transport/class.ilBMFTransport_' . $transport_type . '.php';
56  $res = @include_once($transport_include);
57  if (!$res && !in_array($transport_include, get_included_files())) {
58  $fault = ilBMFBase_Object::_raiseSoapFault("No Transport for {$urlparts['scheme']}");
59  return $fault;
60  }
61  $transport_class = "ilBMFTransport_$transport_type";
62  if (!class_exists($transport_class)) {
63  $fault = ilBMFBase_Object::_raiseSoapFault("No Transport class $transport_class");
64  return $fault;
65  }
66  $t =& new $transport_class($url, $encoding);
67 
68  return $t;
69  }
& _raiseSoapFault($str, $detail='', $actorURI='', $code=null, $mode=null, $options=null, $skipmsg=false)
Raises a SOAP error.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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