TYPO3  7.6
Public Member Functions | Protected Member Functions | Static Private Attributes | List of all members
Swift_Mime_Grammar Class Reference

Public Member Functions

 __construct ()
 
 __wakeup ()
 
 getDefinition ($name)
 
 getGrammarDefinitions ()
 
 getSpecials ()
 
 escapeSpecials ($token, $include=array(), $exclude=array())
 

Protected Member Functions

 init ()
 

Static Private Attributes

static $_specials = array()
 
static $_grammar = array()
 

Detailed Description

Defines the grammar to use for validation, implements the RFC 2822 (and friends) ABNF grammar definitions.

Author
Fabien Potencier
Chris Corbyn

Definition at line 17 of file Grammar.php.

Constructor & Destructor Documentation

__construct ( )

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

Definition at line 36 of file Grammar.php.

References init().

Member Function Documentation

__wakeup ( )

Definition at line 41 of file Grammar.php.

References init().

escapeSpecials (   $token,
  $include = array(),
  $exclude = array() 
)

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

Parameters
string$token
string[]$include additional chars to escape
string[]$exclude chars from escaping
Returns
string

Definition at line 168 of file Grammar.php.

getDefinition (   $name)

Get the grammar defined for $name token.

Parameters
string$nameexactly as written in the RFC
Returns
string

Definition at line 128 of file Grammar.php.

getGrammarDefinitions ( )

Returns the tokens defined in RFC 2822 (and some related RFCs).

Returns
array

Definition at line 144 of file Grammar.php.

getSpecials ( )

Returns the current special characters used in the syntax which need to be escaped.

Returns
array

Definition at line 154 of file Grammar.php.

init ( )
protected

Definition at line 46 of file Grammar.php.

Referenced by __construct(), and __wakeup().

Member Data Documentation

$_grammar = array()
staticprivate

Definition at line 31 of file Grammar.php.

$_specials = array()
staticprivate

Definition at line 24 of file Grammar.php.