Lines Matching refs:this

82       foreach (array_keys($this->cached) as $k) $this->cached[$k] = null;
83 $this->LE = $le;
94 return $this->LE;
101 foreach (array_keys($this->cached) as $k)
103 $this->cached[$k] = null;
114 if (!isset($this->lowerHeaders[$lname]))
116 $this->headers[$name] = null;
117 $this->lowerHeaders[$lname] =& $this->headers[$name];
119 $this->cached[$lname] = null;
125 if (!$this->getCharset() && Swift_Message_Encoder::instance()->isUTF8($v))
127 $this->setCharset("utf-8");
134 if (!$this->getCharset() && Swift_Message_Encoder::instance()->isUTF8($value))
136 $this->setCharset("utf-8");
139 if (!is_array($value) && $value !== null) $this->lowerHeaders[$lname] = (string) $value;
140 else $this->lowerHeaders[$lname] = $value;
152 if ($this->has($name))
154 return $this->lowerHeaders[$lname];
164 if ($this->has($name))
166 unset($this->headers[$name]);
167 unset($this->lowerHeaders[$lname]);
168 unset($this->cached[$lname]);
169 if (isset($this->attributes[$lname])) unset($this->attributes[$lname]);
178 return $this->headers;
188 return (array_key_exists($lname, $this->lowerHeaders) && $this->lowerHeaders[$lname] !== null);
196 $this->language = (string) $lang;
204 return $this->language;
212 $this->charset = (string) $charset;
220 return $this->charset;
240 $this->encoding = "Q";
243 $this->encoding = "B";
254 return $this->encoding;
262 $this->forceEncoding = (boolean) $force;
276 $this->cached[$lheader] = null;
277 if (!$this->has($header))
286 …if (!$this->getCharset() && Swift_Message_Encoder::instance()->isUTF8($value)) $this->setCharset("…
287 if (!isset($this->attributes[$lheader])) $this->attributes[$lheader] = array();
288 if ($value !== null) $this->attributes[$lheader][$name] = (string) $value;
289 else $this->attributes[$lheader][$name] = $value;
302 if (!$this->has($header))
308 …return (isset($this->attributes[$lheader]) && isset($this->attributes[$lheader][$name]) && ($this-…
320 if (!$this->has($header))
330 if ($this->hasAttribute($header, $name))
332 return $this->attributes[$lheader][$name];
344 if ($this->has($header))
346 unset($this->attributes[$lheader][$name]);
357 if (array_key_exists($header, $this->attributes))
359 return $this->attributes[$header];
371 if (!$this->getCharset()) $this->setCharset("iso-8859-1");
377 if ($this->cached[$lname] !== null) return $this->cached[$lname];
379 $value = $this->get($name);
381 $is_email = in_array($name, $this->emailContainingHeaders);
393 if (Swift_Message_Encoder::instance()->isHeaderSafe($row) && !$this->forceEncoding)
397 $row, 72, ($key > 0 ? 0 : (75-(strlen($name)+5))), $this->LE);
399 elseif ($this->encoding == "Q") //QP encode required
401 $spec = "=?" . $this->getCharset() . "?Q?"; //e.g. =?iso-8859-1?Q?
408 $row, (75-(strlen($spec)+6)), ($key > 0 ? 0 : (75-$used_length)), true, $this->LE));
411 elseif ($this->encoding == "B") //Need to Base64 encode
414 $spec = "=?" . $this->getCharset() . "?B?";
418 $row, (75-(strlen($spec)+5)), ($key > 0 ? 0 : (76-($used_length+3))), true, $this->LE);
421 if (false !== $p = strpos($encoded_value[$key], $this->LE))
423 $cb = 'str_replace("' . $this->LE . '", "", "<$1>");';
428 $lines = explode($this->LE, $encoded_value[$key]);
448 if ($this->encoding == "Q") $lines[$i] = rtrim($lines[$i], "=");
467 $encoded_value[$key] = implode($this->LE, $lines);
472 $this->cached[$lname] = implode("," . $this->LE . " ", $encoded_value);
475 …if (!empty($this->attributes[$lname])) $this->cached[$lname] .= $this->buildAttributes($this->cach…
477 return $this->cached[$lname];
492 $lines = explode($this->LE, $header_line);
496 foreach ($this->attributes[$header_name] as $attribute => $att_value)
503 …age_Encoder::instance()->rfc2047Encode($att_value, $this->charset, $this->language, $avail_len, $t…
504 $lines = explode($this->LE, $encoded);
510 $encoded = implode($this->LE, $lines);
538 $append .= $this->LE . " " . $att_copy . "=" . $line;
547 $append = $this->LE . " " . $attribute . "=" . $encoded;
566 foreach ($this->headers as $name => $value) //Look at each header
569 $ret .= ltrim($name, ".") . ": " . $this->getEncoded($name) . $this->LE;