Lines Matching refs:this

108     $this->setHeaders(new Swift_Message_Headers());
110 $this->cache = Swift_CacheFactory::getCache();
132 $this->headers = $headers;
143 $this->cache->clear("body");
144 $this->LE = $le;
146 $this->headers->setLE($le);
147 foreach ($this->children as $id => $child)
149 $this->children[$id]->setLE($le);
162 return $this->LE;
169 $this->cache->clear("body");
170 $this->cache->clear("append");
171 $this->cache->clear("headers");
172 $this->cache->clear("dbl_le");
173 $this->headers->uncacheAll();
174 foreach ($this->children as $id => $child)
176 $this->children[$id]->uncacheAll();
185 $this->headers->set("Content-Type", $type);
195 return $this->headers->get("Content-Type");
208 $this->cache->clear("body");
222 $data = $this->getData();
226 $this->headers->set("Content-Transfer-Encoding", $encoding);
230 $this->headers->set("Content-Transfer-Encoding", $encoding);
235 foreach ($this->children as $id => $child)
237 … if (!$child->getEncoding()) $this->children[$id]->setEncoding($encoding, $recursive, $non_ascii);
248 return $this->headers->get("Content-Transfer-Encoding");
261 $this->cache->clear("body");
262 if ($data instanceof Swift_File) $this->data = $data;
263 else $this->data = (string) $data;
271 return $this->data;
283 …if (!empty($this->children)) //If we've got some mime parts we need to stick them onto the end of …
285 if ($this->boundary === null) $this->boundary = self::generateBoundary();
286 $this->headers->setAttribute("Content-Type", "boundary", $this->boundary);
288 $this->cache->clear("append");
289 foreach ($this->children as $part)
291 $this->cache->write("append", $this->LE . "--" . $this->boundary . $this->LE);
293 while (false !== $bytes = $part_stream->read()) $this->cache->write("append", $bytes);
295 $this->cache->write("append", $this->LE . "--" . $this->boundary . "--" . $this->LE);
302 if ($this->cache->has("body"))
304 $joint_os->addStream($this->cache->getOutputStream("body"));
305 $joint_os->addStream($this->cache->getOutputStream("append"));
309 $is_file = ($this->getData() instanceof Swift_File);
310 switch ($this->getEncoding())
315 $qp_os = Swift_Message_Encoder::instance()->QPEncodeFile($this->getData(), 76, $this->LE);
317 $this->cache->write("body", $bytes);
321 …$this->cache->write("body", Swift_Message_Encoder::instance()->QPEncode($this->getData(), 76, 0, f…
327 … $b64_os = Swift_Message_Encoder::instance()->base64EncodeFile($this->getData(), 76, $this->LE);
329 $this->cache->write("body", $bytes);
333 …$this->cache->write("body", Swift_Message_Encoder::instance()->base64Encode($this->getData(), 76, …
339 $data = $this->getData();
341 $this->cache->write("body", $bytes);
345 $this->cache->write("body", $this->getData());
351 … $os = Swift_Message_Encoder::instance()->encode7BitFile($this->getData(), $this->wrap, $this->LE);
353 $this->cache->write("body", $bytes);
357 …$this->cache->write("body", Swift_Message_Encoder::instance()->encode7Bit($this->getData(), $this-…
363 … $os = Swift_Message_Encoder::instance()->encode8BitFile($this->getData(), $this->wrap, $this->LE);
365 $this->cache->write("body", $bytes);
369 …$this->cache->write("body", Swift_Message_Encoder::instance()->encode8Bit($this->getData(), $this-…
373 $joint_os->addStream($this->cache->getOutputStream("body"));
374 $joint_os->addStream($this->cache->getOutputStream("append"));
383 $this->cache->clear("body");
384 $this->wrap = (int) $len;
400 } while (array_key_exists($id, $this->children));
403 if ($after == -1) $this->children = array_merge(array($id => $mime), $this->children);
404 else $this->children[$id] = $mime;
415 return array_key_exists($id, $this->children);
425 if ($this->hasChild($id))
427 return $this->children[$id];
443 if (!$this->hasChild($id))
450 $this->children[$id] = null;
451 unset($this->children[$id]);
460 return array_keys($this->children);
468 return count($this->children);
483 $this->preBuild();
484 $data = $this->buildData();
486 $this->cache->clear("headers");
487 $this->cache->write("headers", $this->headers->build());
488 $joint_os->addStream($this->cache->getOutputStream("headers"));
489 $this->cache->clear("dbl_le");
490 $this->cache->write("dbl_le", str_repeat($this->LE, 2));
491 $joint_os->addStream($this->cache->getOutputStream("dbl_le"));