50 $this->content = array();
51 $this->attachments = array();
68 $handle = fopen($filename,
"rb");
69 if (FALSE === $filename) {
73 while (!feof($handle)) {
74 $contents .= fread($handle, 8192);
77 if ($attachmentFileName === null) {
78 $attachmentFileName = basename($filename);
81 $this->attachments[] = $attachment;
92 $this->attachments[] = $attachment;
103 $this->attachments[] = $attachment;
111 return "Transaction [type=" . $this->type .
", contact=(" . (empty( $this->contact))?
"":$this->contact->toString() .
"), import=(" . (empty( $this->
import))?
"":$this->import->toString() .
"), content=(" . json_encode($this->content) .
")]";
115 $array = parent::toArray();
117 if(isset($array[
'import'])) {
118 unset($array[
'contact']);
addAttachmentFromBase64Data($filename, $mimetype, $contents)
addAttachmentFromFile($filename, $mimetype, $attachmentFileName=null)
addAttachmentFromBinaryData($filename, $mimetype, $contents)