Class Swift_Mime_Headers_AbstractHeader

(line 21)

Description


Located in File: /vendors/swiftMailer/classes/Swift/Mime/Headers/AbstractHeader.php

An abstract base MIME Header.


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.

Class Variables

Summary:

Class Constants

Summary:

Method Detail

Summary:
void clearCachedValueIf (boolean $condition)
string createPhrase (Swift_Mime_Header $header, string $string, string $charset, [Swift_Mime_HeaderEncoder $encoder = null], [boolean $shorten = false])
string encodeWords (Swift_Mime_Header $header, string $input, [ $usedLength = -1], string $usedLength,)
string escapeSpecials (string $token, [string[] $include = array()], [string[] $exclude = array()])
string[] generateTokenLines (string $token)
string getCachedValue ()
string getCharset ()
string[] getEncodableWordTokens (string $string)
string getFieldName ()
string getGrammar (string $name)
string getLanguage ()
string getTokenAsEncodedWord (string $token, [ $firstLineOffset = 0], int $firstLineOffset,)
void setCachedValue (string $value)
void setCharset (string $charset)
void setFieldName (string $name)
void setLanguage (string $lang)
void setMaxLineLength (int $lineLength)
boolean tokenNeedsEncoding (string $token)
string toString ()
string[] toTokens ([string $string = null])
string __toString ()

Method clearCachedValueIf (line 525)

void clearCachedValueIf( boolean $condition)

Clear the cached value if $condition is met.

Parameters

  • boolean $condition:

Info

  • access - protected

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

  • access - protected

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

  • string $input:
  • string $usedLength,: optional
  • Swift_Mime_Header $header:
  • $usedLength:

Info

  • access - protected

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

  • access - protected

Method generateTokenLines (line 495)

string[] generateTokenLines( string $token)

Generates tokens from the given string which include CRLF as individual tokens.

Parameters

  • string $token:

Info

  • access - protected

Method getCachedValue (line 515)

string getCachedValue( )

Get the value in the cache.

Info

  • access - protected

Method getCharset (line 97)

string getCharset( )

Get the character set used in this Header.

Info

  • access - public

Method getEncodableWordTokens (line 420)

string[] getEncodableWordTokens( string $string)

Splits a string into tokens in blocks of words which can be encoded quickly.

Parameters

  • string $string:

Info

  • access - protected

Method getEncoder (line 137)

Swift_Mime_HeaderEncoder getEncoder( )

Get the encoder used for encoding this Header.

Info

  • access - public

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

  • access - public

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

  • access - protected

Method getLanguage (line 118)

string getLanguage( )

Get the language used in this Header.

Info

  • access - public

Method getMaxLineLength (line 165)

int getMaxLineLength( )

Get the maximum permitted length of lines in this Header.

Info

  • access - public

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

  • access - protected

Method initializeGrammar (line 208)

void initializeGrammar( )

Initialize some RFC 2822 (and friends) ABNF grammar definitions.

Info

  • access - protected

Method setCachedValue (line 505)

void setCachedValue( string $value)

Set a value into the cache.

Parameters

  • string $value:

Info

  • access - protected

Method setCharset (line 83)

void setCharset( string $charset)

Overridden in child classes as:

Swift_Mime_Headers_ParameterizedHeader::setCharset()
Set the character set used in this Header.


Implementation of:
Swift_Mime_Header::setCharset()
Set the charset used when rendering the Header.
Set the character set used in this Header.

Parameters

  • string $charset:

Info

  • access - public

Method setEncoder (line 127)

void setEncoder( Swift_Mime_HeaderEncoder $encoder)

Set the encoder used for encoding the header.

Parameters

Info

  • access - public

Method setFieldName (line 199)

void setFieldName( string $name)

Set the name of this Header field.

Parameters

  • string $name:

Info

  • access - protected

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

  • string $lang:

Info

  • access - public

Method setMaxLineLength (line 155)

void setMaxLineLength( int $lineLength)

Set the maximum length of lines in the header (excluding EOL).

Parameters

  • int $lineLength:

Info

  • access - public

Method tokenNeedsEncoding (line 410)

boolean tokenNeedsEncoding( string $token)

Test if a token needs to be encoded or not.

Parameters

  • string $token:

Info

  • access - protected

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

  • access - protected

Method __toString (line 187)

string __toString( )

Returns a string representation of this object.

Info

Inherited Variables

Inherited Class Variable Summary

Inherited Methods

Inherited Method Summary


Documentation generated on Fri, 12 Nov 2010 20:45:09 +0000 by phpDocumentor 1.4.3