Swift
[ class tree: Swift ] [ index: Swift ] [ all elements ]

Class: Swift_Mime_Headers_AbstractHeader

Source Location: /vendors/swift/classes/Swift/Mime/Headers/AbstractHeader.php

Class Overview


An abstract base MIME Header.


Author(s):

  • Chris Corbyn

Implements interfaces:

Methods


Child classes:

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_DateHeader
A Date MIME Header for Swift Mailer.
Swift_Mime_Headers_UnstructuredHeader
A Simple MIME Header.
Swift_Mime_Headers_IdentificationHeader
An ID MIME Header for something like Message-ID or Content-ID.

Class Details

[line 21]
An abstract base MIME Header.



Tags:

author:  Chris Corbyn
abstract:  
filesource:  Source Code for this file


[ Top ]


Class Methods


method clearCachedValueIf [line 525]

void clearCachedValueIf( boolean $condition)

Clear the cached value if $condition is met.



Tags:

access:  protected


Parameters:

boolean   $condition  

[ Top ]

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.



Tags:

access:  protected


Parameters:

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

[ Top ]

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.



Tags:

access:  protected


Parameters:

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

[ Top ]

method escapeSpecials [line 305]

string escapeSpecials( string $token, [string[] $include = array()], [string[] $exclude = array()])

Escape special characters in a string (convert to quoted-pairs).



Tags:

access:  protected


Parameters:

string   $token  
string[]   $include   additonal chars to escape
string[]   $exclude   chars from escaping

[ Top ]

method generateTokenLines [line 495]

string[] generateTokenLines( string $token)

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



Tags:

access:  protected


Parameters:

string   $token  

[ Top ]

method getCachedValue [line 515]

string getCachedValue( )

Get the value in the cache.



Tags:

access:  protected


[ Top ]

method getCharset [line 97]

string getCharset( )

Get the character set used in this Header.



Tags:

access:  public


[ Top ]

method getEncodableWordTokens [line 420]

string[] getEncodableWordTokens( string $string)

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



Tags:

access:  protected


Parameters:

string   $string  

[ Top ]

method getEncoder [line 137]

Swift_Mime_HeaderEncoder getEncoder( )

Get the encoder used for encoding this Header.



Tags:

access:  public


[ Top ]

method getFieldName [line 146]

string getFieldName( )

Get the name of this header (e.g. charset).



Tags:

access:  public



Implementation of:
Swift_Mime_Header::getFieldName()
Get the name of this header (e.g. Subject).
[ Top ]

method getGrammar [line 284]

string getGrammar( string $name)

Get the grammar defined for $name token.



Tags:

access:  protected


Parameters:

string   $name   execatly as written in the RFC

[ Top ]

method getLanguage [line 118]

string getLanguage( )

Get the language used in this Header.



Tags:

access:  public


[ Top ]

method getMaxLineLength [line 165]

int getMaxLineLength( )

Get the maximum permitted length of lines in this Header.



Tags:

access:  public


[ Top ]

method getTokenAsEncodedWord [line 456]

string getTokenAsEncodedWord( string $token, [ $firstLineOffset = 0], int $firstLineOffset,)

Get a token as an encoded word for safe insertion into headers.



Tags:

access:  protected


Parameters:

string   $token   to encode
int   $firstLineOffset,   optional
   $firstLineOffset  

[ Top ]

method initializeGrammar [line 208]

void initializeGrammar( )

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



Tags:

access:  protected


[ Top ]

method setCachedValue [line 505]

void setCachedValue( string $value)

Set a value into the cache.



Tags:

access:  protected


Parameters:

string   $value  

[ Top ]

method setCharset [line 83]

void setCharset( string $charset)

Set the character set used in this Header.



Tags:

access:  public


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.

Parameters:

string   $charset  

[ Top ]

method setEncoder [line 127]

void setEncoder( Swift_Mime_HeaderEncoder $encoder)

Set the encoder used for encoding the header.



Tags:

access:  public


Parameters:

Swift_Mime_HeaderEncoder   $encoder  

[ Top ]

method setFieldName [line 199]

void setFieldName( string $name)

Set the name of this Header field.



Tags:

access:  protected


Parameters:

string   $name  

[ Top ]

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.




Tags:

access:  public


Parameters:

string   $lang  

[ Top ]

method setMaxLineLength [line 155]

void setMaxLineLength( int $lineLength)

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



Tags:

access:  public


Parameters:

int   $lineLength  

[ Top ]

method tokenNeedsEncoding [line 410]

boolean tokenNeedsEncoding( string $token)

Test if a token needs to be encoded or not.



Tags:

access:  protected


Parameters:

string   $token  

[ Top ]

method toString [line 175]

string toString( )

Get this Header rendered as a RFC 2822 compliant string.



Tags:

throws:  Swift_RfcComplianceException
access:  public



Implementation of:
Swift_Mime_Header::toString()
Get this Header rendered as a compliant string.
[ Top ]

method toTokens [line 541]

string[] toTokens( [string $string = null])

Generate a list of all tokens in the final header.



Tags:

access:  protected


Overridden in child classes as:

Swift_Mime_Headers_ParameterizedHeader::toTokens()
Generate a list of all tokens in the final header.

Parameters:

string   $string   input, optional

[ Top ]

method __toString [line 187]

string __toString( )

Returns a string representation of this object.



Tags:



[ Top ]


Documentation generated on Mon, 05 Sep 2011 20:31:50 -0500 by phpDocumentor 1.4.3