Description
Located in File: /vendors/swiftMailer/classes/Swift/Mime/Headers/AbstractHeader.php
An abstract base MIME Header.
- author: - Chris Corbyn
- abstract: -
Classes extended from Swift_Mime_Headers_AbstractHeader:
- Swift_Mime_Headers_DateHeader
- A Date MIME Header for Swift Mailer.
- Swift_Mime_Headers_IdentificationHeader
- An ID MIME Header for something like Message-ID or Content-ID.
- Swift_Mime_Headers_MailboxHeader
- A Mailbox Address MIME Header for something like From or Sender.
- Swift_Mime_Headers_PathHeader
- A Path Header in Swift Mailer, such a Return-Path.
- Swift_Mime_Headers_UnstructuredHeader
- A Simple MIME Header.
Method Detail
Summary:
string
escapeSpecials
(
string $token, [
string[] $include =
array()], [
string[] $exclude =
array()])
string[]
toTokens
([
string $string =
null])
Method clearCachedValueIf (line 525)
void clearCachedValueIf(
boolean
$condition)
Clear the cached value if $condition is met.
Parameters
Info
Method createPhrase (line 325)
string createPhrase(
Swift_Mime_Header
$header, string
$string, string
$charset, [Swift_Mime_HeaderEncoder
$encoder = null], [boolean
$shorten = false])
Produces a compliant, formatted RFC 2822 'phrase' based on the string given.
Parameters
Info
Method encodeWords (line 366)
string encodeWords(
Swift_Mime_Header
$header, string
$input, [
$usedLength = -1], string
$usedLength,)
Encode needed word tokens within a string of input.
Parameters
Info
Method escapeSpecials (line 305)
string escapeSpecials(
string
$token, [string[]
$include = array()], [string[]
$exclude = array()])
Escape special characters in a string (convert to quoted-pairs).
Parameters
- string $token:
- string[] $include: additonal chars to escape
- string[] $exclude: chars from escaping
Info
Method generateTokenLines (line 495)
string[] generateTokenLines(
string
$token)
Generates tokens from the given string which include CRLF as individual tokens.
Parameters
Info
Method getCachedValue (line 515)
string getCachedValue(
)
Get the value in the cache.
Info
Method getCharset (line 97)
string getCharset(
)
Get the character set used in this Header.
Info
Method getEncodableWordTokens (line 420)
string[] getEncodableWordTokens(
string
$string)
Splits a string into tokens in blocks of words which can be encoded quickly.
Parameters
Info
Method getEncoder (line 137)
Get the encoder used for encoding this Header.
Info
Method getFieldName (line 146)
string getFieldName(
)
Implementation of:
- Swift_Mime_Header::getFieldName()
- Get the name of this header (e.g. Subject).
Get the name of this header (e.g. charset).
Info
Method getGrammar (line 284)
string getGrammar(
string
$name)
Get the grammar defined for $name token.
Parameters
- string $name: execatly as written in the RFC
Info
Method getLanguage (line 118)
string getLanguage(
)
Get the language used in this Header.
Info
Method getMaxLineLength (line 165)
int getMaxLineLength(
)
Get the maximum permitted length of lines in this Header.
Info
Method getTokenAsEncodedWord (line 456)
string getTokenAsEncodedWord(
string
$token, [
$firstLineOffset = 0], int
$firstLineOffset,)
Get a token as an encoded word for safe insertion into headers.
Parameters
- string $token: to encode
- int $firstLineOffset,: optional
- $firstLineOffset:
Info
Method initializeGrammar (line 208)
void initializeGrammar(
)
Initialize some RFC 2822 (and friends) ABNF grammar definitions.
Info
Method setCachedValue (line 505)
void setCachedValue(
string
$value)
Set a value into the cache.
Parameters
Info
Method setEncoder (line 127)
Set the encoder used for encoding the header.
Parameters
Info
Method setFieldName (line 199)
void setFieldName(
string
$name)
Set the name of this Header field.
Parameters
Info
Method setLanguage (line 108)
void setLanguage(
string
$lang)
Set the language used in this Header.
For example, for US English, 'en-us'. This can be unspecified.
Parameters
Info
Method setMaxLineLength (line 155)
void setMaxLineLength(
int
$lineLength)
Set the maximum length of lines in the header (excluding EOL).
Parameters
Info
Method tokenNeedsEncoding (line 410)
boolean tokenNeedsEncoding(
string
$token)
Test if a token needs to be encoded or not.
Parameters
Info
Method toString (line 175)
string toString(
)
Implementation of:
- Swift_Mime_Header::toString()
- Get this Header rendered as a compliant string.
Get this Header rendered as a RFC 2822 compliant string.
Info
- throws - Swift_RfcComplianceException
- access - public
Method toTokens (line 541)
string[] toTokens(
[string
$string = null])
Overridden in child classes as:
- Swift_Mime_Headers_ParameterizedHeader::toTokens()
- Generate a list of all tokens in the final header.
Generate a list of all tokens in the final header.
Parameters
- string $string: input, optional
Info
Method __toString (line 187)
string __toString(
)
Returns a string representation of this object.
Info