25 require_once dirname(__FILE__).
'/class.ilBMFBase.php';
86 function ilBMFValue($name =
'', $type =
false, $value = null,
87 $attributes = array())
90 $this->nqn =&
new QName($name);
91 $this->name = $this->nqn->name;
92 $this->
namespace = $this->nqn->namespace;
93 $this->tqn =&
new QName($type);
94 $this->type = $this->tqn->name;
95 $this->type_prefix = $this->tqn->ns;
96 $this->type_namespace = $this->tqn->namespace;
111 return $serializer->_serializeValue($this->value,
115 $this->type_namespace,
148 function ilBMFHeader($name =
'', $type, $value, $mustunderstand = 0,
149 $attributes = array())
151 if (!is_array($attributes)) {
153 $attributes = array();
156 parent::ilBMFValue($name, $type, $value, $attributes);
159 $this->attributes[
'SOAP-ENV:actor'] = $actor;
160 } elseif (!isset($this->attributes[
'SOAP-ENV:actor'])) {
161 $this->attributes[
'SOAP-ENV:actor'] =
'http://schemas.xmlsoap.org/soap/actor/next';
163 $this->attributes[
'SOAP-ENV:mustUnderstand'] = (int)$mustunderstand;
190 parent::ilBMFValue($name, null, null);
192 if (!isset(
$GLOBALS[
'SOAP_options'][
'Mime'])) {
193 $this->options[
'attachment'] =
PEAR::raiseError(
'Mail_mime is not installed, unable to support SOAP Attachements');
200 $this->options[
'attachment'] = $filedata;
204 $cid = md5(uniqid(time()));
206 $this->attributes[
'href'] =
'cid:' . $cid;
208 $this->options[
'attachment'] = array(
'body' => $filedata,
210 'content_type' => $type,
211 'encoding' =>
'base64',
226 if (!is_readable($file_name)) {
230 if (function_exists(
'file_get_contents')) {
231 return file_get_contents($file_name);
234 if (!$fd = fopen($file_name,
'rb')) {
237 $cont = fread($fd, filesize($file_name));
serialize(&$serializer)
Serializes this value.
ilBMFValue($name='', $type=false, $value=null, $attributes=array())
Constructor.
_file2str($file_name)
Returns the contents of the given file name as string.
SOAP_Attachment($name='', $type='application/octet-stream', $filename, $file=null)
Constructor.
& raiseError($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false)
This method is a wrapper that returns an instance of the configured error class with this object's de...
isError($data, $code=null)
Tell whether a value is a PEAR error.