XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
__toString () | |
getCharset () | |
getEncoder () | |
getFieldName () | |
getLanguage () | |
getMaxLineLength () | |
setCharset ($charset) | |
setEncoder (Swift_Mime_HeaderEncoder $encoder) | |
setLanguage ($lang) | |
setMaxLineLength ($lineLength) | |
toString () | |
Public Member Functions inherited from Swift_Mime_Header | |
getFieldBody () | |
getFieldBodyModel () | |
getFieldType () | |
setFieldBodyModel ($model) | |
Protected Member Functions | |
clearCachedValueIf ($condition) | |
createPhrase (Swift_Mime_Header $header, $string, $charset, Swift_Mime_HeaderEncoder $encoder=null, $shorten=false) | |
encodeWords (Swift_Mime_Header $header, $input, $usedLength=-1) | |
escapeSpecials ($token, $include=array(), $exclude=array()) | |
generateTokenLines ($token) | |
getCachedValue () | |
getEncodableWordTokens ($string) | |
getGrammar ($name) | |
getTokenAsEncodedWord ($token, $firstLineOffset=0) | |
initializeGrammar () | |
setCachedValue ($value) | |
setFieldName ($name) | |
tokenNeedsEncoding ($token) | |
toTokens ($string=null) | |
Private Member Functions | |
_tokensToString (array $tokens) | |
Private Attributes | |
$_cachedValue = null | |
$_charset = 'utf-8' | |
$_encoder | |
$_grammar = array() | |
$_lang | |
$_lineLength = 78 | |
$_name | |
$_specials = array() | |
Additional Inherited Members | |
Public Attributes inherited from Swift_Mime_Header | |
const | TYPE_DATE = 16 |
const | TYPE_ID = 32 |
const | TYPE_MAILBOX = 8 |
const | TYPE_PARAMETERIZED = 6 |
const | TYPE_PATH = 64 |
const | TYPE_TEXT = 2 |
Definition at line 21 of file AbstractHeader.php.
Swift_Mime_Headers_AbstractHeader::__toString | ( | ) |
Returns a string representation of this object.
Definition at line 187 of file AbstractHeader.php.
References toString().
|
private |
Takes an array of tokens which appear in the header and turns them into an RFC 2822 compliant string, adding FWSP where needed.
string[] | $tokens |
Definition at line 566 of file AbstractHeader.php.
Referenced by toString().
|
protected |
Clear the cached value if $condition is met.
boolean | $condition | protected |
Definition at line 525 of file AbstractHeader.php.
References setCachedValue().
Referenced by setCharset(), Swift_Mime_Headers_IdentificationHeader\setIds(), setLanguage(), setMaxLineLength(), Swift_Mime_Headers_ParameterizedHeader\setParameters(), Swift_Mime_Headers_DateHeader\setTimestamp(), and Swift_Mime_Headers_UnstructuredHeader\setValue().
|
protected |
Produces a compliant, formatted RFC 2822 'phrase' based on the string given.
Swift_Mime_Header | $header | |
string | $string | as displayed |
string | $charset | of the text |
Swift_Mime_HeaderEncoder | $encoder | |
boolean | $shorten | the first line to make remove for header name |
Definition at line 325 of file AbstractHeader.php.
References encodeWords(), escapeSpecials(), and Swift_Mime_Header\getFieldName().
Referenced by Swift_Mime_Headers_MailboxHeader\createDisplayNameString().
|
protected |
Encode needed word tokens within a string of input.
string | $input | |
string | $usedLength,optional |
Definition at line 366 of file AbstractHeader.php.
References $token, getEncodableWordTokens(), Swift_Mime_Header\getFieldName(), getTokenAsEncodedWord(), and tokenNeedsEncoding().
Referenced by createPhrase(), and Swift_Mime_Headers_UnstructuredHeader\getFieldBody().
|
protected |
Escape special characters in a string (convert to quoted-pairs).
string | $token | |
string[] | $include additonal chars to escape | |
string[] | $exclude chars from escaping |
Definition at line 305 of file AbstractHeader.php.
References $token.
Referenced by createPhrase().
|
protected |
Generates tokens from the given string which include CRLF as individual tokens.
string | $token |
Definition at line 495 of file AbstractHeader.php.
References $token.
Referenced by Swift_Mime_Headers_ParameterizedHeader\toTokens(), and toTokens().
|
protected |
Get the value in the cache.
Definition at line 515 of file AbstractHeader.php.
References $_cachedValue.
Referenced by Swift_Mime_Headers_UnstructuredHeader\getFieldBody(), Swift_Mime_Headers_DateHeader\getFieldBody(), Swift_Mime_Headers_PathHeader\getFieldBody(), Swift_Mime_Headers_IdentificationHeader\getFieldBody(), and Swift_Mime_Headers_MailboxHeader\getFieldBody().
Swift_Mime_Headers_AbstractHeader::getCharset | ( | ) |
Get the character set used in this Header.
Definition at line 97 of file AbstractHeader.php.
References $_charset.
Referenced by Swift_Mime_Headers_ParameterizedHeader\_createParameter(), Swift_Mime_Headers_ParameterizedHeader\_getEndOfParameterValue(), Swift_Mime_Headers_MailboxHeader\createDisplayNameString(), and Swift_Mime_Headers_UnstructuredHeader\getFieldBody().
|
protected |
Splits a string into tokens in blocks of words which can be encoded quickly.
string | $string |
Definition at line 420 of file AbstractHeader.php.
References $token, and tokenNeedsEncoding().
Referenced by encodeWords().
Swift_Mime_Headers_AbstractHeader::getEncoder | ( | ) |
Get the encoder used for encoding this Header.
Definition at line 137 of file AbstractHeader.php.
References $_encoder.
Referenced by Swift_Mime_Headers_MailboxHeader\createDisplayNameString(), and Swift_Mime_Headers_UnstructuredHeader\getFieldBody().
Swift_Mime_Headers_AbstractHeader::getFieldName | ( | ) |
Get the name of this header (e.g. charset).
Implements Swift_Mime_Header.
Definition at line 146 of file AbstractHeader.php.
References $_name.
|
protected |
Get the grammar defined for $name token.
string | $name | execatly as written in the RFC |
Definition at line 284 of file AbstractHeader.php.
Referenced by Swift_Mime_Headers_MailboxHeader\_assertValidAddress(), Swift_Mime_Headers_ParameterizedHeader\_createParameter(), Swift_Mime_Headers_PathHeader\setAddress(), and Swift_Mime_Headers_IdentificationHeader\setIds().
Swift_Mime_Headers_AbstractHeader::getLanguage | ( | ) |
Get the language used in this Header.
Definition at line 118 of file AbstractHeader.php.
References $_lang.
Referenced by Swift_Mime_Headers_ParameterizedHeader\_createParameter(), and Swift_Mime_Headers_ParameterizedHeader\_getEndOfParameterValue().
Swift_Mime_Headers_AbstractHeader::getMaxLineLength | ( | ) |
Get the maximum permitted length of lines in this Header.
Definition at line 165 of file AbstractHeader.php.
References $_lineLength.
Referenced by Swift_Mime_Headers_ParameterizedHeader\_createParameter().
|
protected |
Get a token as an encoded word for safe insertion into headers.
string | $token | to encode |
int | $firstLineOffset,optional |
Definition at line 456 of file AbstractHeader.php.
References $_charset, $_lang, and $token.
Referenced by Swift_Mime_Headers_ParameterizedHeader\_createParameter(), and encodeWords().
|
protected |
Initialize some RFC 2822 (and friends) ABNF grammar definitions. protected
Definition at line 208 of file AbstractHeader.php.
Referenced by Swift_Mime_Headers_PathHeader\__construct(), Swift_Mime_Headers_MailboxHeader\__construct(), Swift_Mime_Headers_IdentificationHeader\__construct(), and Swift_Mime_Headers_ParameterizedHeader\__construct().
|
protected |
Set a value into the cache.
string | $value | protected |
Definition at line 505 of file AbstractHeader.php.
Referenced by clearCachedValueIf(), Swift_Mime_Headers_UnstructuredHeader\getFieldBody(), Swift_Mime_Headers_DateHeader\getFieldBody(), Swift_Mime_Headers_PathHeader\getFieldBody(), Swift_Mime_Headers_IdentificationHeader\getFieldBody(), Swift_Mime_Headers_MailboxHeader\getFieldBody(), Swift_Mime_Headers_MailboxHeader\removeAddresses(), Swift_Mime_Headers_PathHeader\setAddress(), setEncoder(), and Swift_Mime_Headers_MailboxHeader\setNameAddresses().
Swift_Mime_Headers_AbstractHeader::setCharset | ( | $charset | ) |
Set the character set used in this Header.
string | $charset |
Implements Swift_Mime_Header.
Definition at line 83 of file AbstractHeader.php.
References clearCachedValueIf().
Swift_Mime_Headers_AbstractHeader::setEncoder | ( | Swift_Mime_HeaderEncoder | $encoder | ) |
Set the encoder used for encoding the header.
Swift_Mime_HeaderEncoder | $encoder |
Definition at line 127 of file AbstractHeader.php.
References setCachedValue().
Referenced by Swift_Mime_Headers_MailboxHeader\__construct(), Swift_Mime_Headers_UnstructuredHeader\__construct(), and Swift_Mime_Headers_ParameterizedHeader\__construct().
|
protected |
Set the name of this Header field.
string | $name | protected |
Definition at line 199 of file AbstractHeader.php.
Referenced by Swift_Mime_Headers_PathHeader\__construct(), Swift_Mime_Headers_MailboxHeader\__construct(), Swift_Mime_Headers_UnstructuredHeader\__construct(), Swift_Mime_Headers_IdentificationHeader\__construct(), Swift_Mime_Headers_DateHeader\__construct(), and Swift_Mime_Headers_ParameterizedHeader\__construct().
Swift_Mime_Headers_AbstractHeader::setLanguage | ( | $lang | ) |
Set the language used in this Header. For example, for US English, 'en-us'. This can be unspecified.
string | $lang |
Definition at line 108 of file AbstractHeader.php.
References $lang, and clearCachedValueIf().
Swift_Mime_Headers_AbstractHeader::setMaxLineLength | ( | $lineLength | ) |
Set the maximum length of lines in the header (excluding EOL).
int | $lineLength |
Definition at line 155 of file AbstractHeader.php.
References clearCachedValueIf().
|
protected |
Test if a token needs to be encoded or not.
string | $token |
Definition at line 410 of file AbstractHeader.php.
References $token.
Referenced by encodeWords(), and getEncodableWordTokens().
Swift_Mime_Headers_AbstractHeader::toString | ( | ) |
Get this Header rendered as a RFC 2822 compliant string.
Swift_RfcComplianceException |
Implements Swift_Mime_Header.
Definition at line 175 of file AbstractHeader.php.
References _tokensToString(), and toTokens().
Referenced by __toString().
|
protected |
Generate a list of all tokens in the final header.
string | $string | input, optional |
Definition at line 541 of file AbstractHeader.php.
References $token, generateTokenLines(), and Swift_Mime_Header\getFieldBody().
Referenced by toString().
|
private |
Definition at line 77 of file AbstractHeader.php.
Referenced by getCachedValue().
|
private |
Definition at line 70 of file AbstractHeader.php.
Referenced by getCharset(), and getTokenAsEncodedWord().
|
private |
Definition at line 50 of file AbstractHeader.php.
Referenced by getEncoder().
|
private |
Definition at line 36 of file AbstractHeader.php.
|
private |
Definition at line 63 of file AbstractHeader.php.
Referenced by getLanguage(), and getTokenAsEncodedWord().
|
private |
Definition at line 57 of file AbstractHeader.php.
Referenced by getMaxLineLength().
|
private |
Definition at line 43 of file AbstractHeader.php.
Referenced by getFieldName().
|
private |
Definition at line 29 of file AbstractHeader.php.