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

Class: Swift_Mime_Headers_AbstractHeader

Source Location: /system/vendor/swiftmailer/swiftmailer/lib/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_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 Details

[line 16]
An abstract base MIME Header.



Tags:

author:  Chris Corbyn
abstract:  


[ Top ]


Class Methods


constructor __construct [line 72]

Swift_Mime_Headers_AbstractHeader __construct( Swift_Mime_Grammar $grammar)

Creates a new Header.



Tags:

access:  public


Overridden in child classes as:

Swift_Mime_Headers_DateHeader::__construct()
Creates a new DateHeader with $name and $timestamp.
Swift_Mime_Headers_IdentificationHeader::__construct()
Creates a new IdentificationHeader with the given $name and $id.
Swift_Mime_Headers_MailboxHeader::__construct()
Creates a new MailboxHeader with $name.
Swift_Mime_Headers_PathHeader::__construct()
Creates a new PathHeader with the given $name.
Swift_Mime_Headers_UnstructuredHeader::__construct()
Creates a new SimpleHeader with $name.
Swift_Mime_Headers_ParameterizedHeader::__construct()
Creates a new ParameterizedHeader with $name.

Parameters:

Swift_Mime_Grammar   $grammar  

[ Top ]

method clearCachedValueIf [line 436]

void clearCachedValueIf( bool $condition)

Clear the cached value if $condition is met.



Tags:

access:  protected


Parameters:

bool   $condition  

[ Top ]

method createPhrase [line 245]

string createPhrase( Swift_Mime_Header $header, string $string, string $charset, [Swift_Mime_HeaderEncoder $encoder = null], [bool $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  
bool   $shorten   the first line to make remove for header name

[ Top ]

method encodeWords [line 282]

string encodeWords( Swift_Mime_Header $header, string $input, [string $usedLength = -1])

Encode needed word tokens within a string of input.



Tags:

access:  protected


Parameters:

Swift_Mime_Header   $header  
string   $input  
string   $usedLength   optional

[ Top ]

method generateTokenLines [line 406]

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 426]

string getCachedValue( )

Get the value in the cache.



Tags:

access:  protected


[ Top ]

method getCharset [line 96]

string getCharset( )

Get the character set used in this Header.



Tags:

access:  public


[ Top ]

method getEncodableWordTokens [line 333]

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 141]

Swift_Mime_HeaderEncoder getEncoder( )

Get the encoder used for encoding this Header.



Tags:

access:  public


[ Top ]

method getFieldName [line 172]

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 162]

Swift_Mime_Grammar getGrammar( )

Get the grammar used for this Header.



Tags:

access:  public


[ Top ]

method getLanguage [line 120]

string getLanguage( )

Get the language used in this Header.



Tags:

access:  public


[ Top ]

method getMaxLineLength [line 193]

int getMaxLineLength( )

Get the maximum permitted length of lines in this Header.



Tags:

access:  public


[ Top ]

method getTokenAsEncodedWord [line 365]

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

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



Tags:

access:  protected


Parameters:

string   $token   token to encode
int   $firstLineOffset   optional

[ Top ]

method setCachedValue [line 416]

void setCachedValue( string $value)

Set a value into the cache.



Tags:

access:  protected


Parameters:

string   $value  

[ Top ]

method setCharset [line 82]

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 130]

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 229]

void setFieldName( string $name)

Set the name of this Header field.



Tags:

access:  protected


Parameters:

string   $name  

[ Top ]

method setGrammar [line 151]

void setGrammar( Swift_Mime_Grammar $grammar)

Set the grammar used for the header.



Tags:

access:  public


Parameters:

Swift_Mime_Grammar   $grammar  

[ Top ]

method setLanguage [line 109]

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 182]

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 321]

bool tokenNeedsEncoding( string $token)

Test if a token needs to be encoded or not.



Tags:

access:  protected


Overridden in child classes as:

Swift_Mime_Headers_MailboxHeader::tokenNeedsEncoding()
Redefine the encoding requirements for mailboxes.

Parameters:

string   $token  

[ Top ]

method toString [line 205]

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 450]

array toTokens( [string $string = null])

Generate a list of all tokens in the final header.



Tags:

return:  An array of tokens as strings
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   The string to tokenize

[ Top ]

method __toString [line 217]

string __toString( )

Returns a string representation of this object.



Tags:



[ Top ]


Documentation generated on Sun, 02 Oct 2016 07:43:04 +0000 by phpDocumentor 1.4.3