Class Ingo_Script_sieve

Description

The Ingo_Script_sieve class represents a Sieve Script.

$Horde: ingo/lib/Script/sieve.php,v 1.63.10.42 2009/12/22 13:52:24 jan Exp $

See the enclosed file LICENSE for license information (ASL). If you did not receive this file, see http://www.horde.org/licenses/asl.php.

Located in /lib/Script/sieve.php (line 13)

Ingo_Script
   |
   --Ingo_Script_sieve
Variable Summary
 array $_actions
 array $_blocks
 boolean $_casesensitive
 array $_categories
 array $_endBlocks
 boolean $_scriptfile
 array $_tests
 array $_types
Method Summary
 boolean|string check ()
 string escapeString (string $string, [boolean $regexmode = false])
 string generate ()
 array requires ()
 string toCode ()
 void _addSpamBlocks ()
Variables
array $_actions = array(
INGO_STORAGE_ACTION_KEEP,
INGO_STORAGE_ACTION_MOVE,
INGO_STORAGE_ACTION_DISCARD,
INGO_STORAGE_ACTION_REDIRECT,
INGO_STORAGE_ACTION_REDIRECTKEEP,
INGO_STORAGE_ACTION_MOVEKEEP,
INGO_STORAGE_ACTION_REJECT,
INGO_STORAGE_ACTION_FLAGONLY,
INGO_STORAGE_ACTION_NOTIFY
)
(line 20)

The list of actions allowed (implemented) for this driver.


Redefinition of:
Ingo_Script::$_actions
The list of actions allowed (implemented) for this driver.
array $_blocks = array() (line 102)

The blocks that make up the code.

boolean $_casesensitive = true (line 74)

Can tests be case sensitive?


Redefinition of:
Ingo_Script::$_casesensitive
Can tests be case sensitive?
array $_categories = array(
INGO_STORAGE_ACTION_BLACKLIST,
INGO_STORAGE_ACTION_WHITELIST,
INGO_STORAGE_ACTION_VACATION,
INGO_STORAGE_ACTION_FORWARD,
INGO_STORAGE_ACTION_SPAM
)
(line 37)

The categories of filtering allowed.


Redefinition of:
Ingo_Script::$_categories
The categories of filtering allowed.
array $_endBlocks = array() (line 109)

The blocks that have to appear at the end of the code.

boolean $_scriptfile = true (line 95)

Does the driver require a script file to be generated?


Redefinition of:
Ingo_Script::$_scriptfile
Does the driver require a script file to be generated?
boolean $_supportIMAPFlags = true (line 81)

Does the driver support setting IMAP flags?


Redefinition of:
Ingo_Script::$_supportIMAPFlags
Does the driver support setting IMAP flags?
boolean $_supportStopScript = true (line 88)

Does the driver support the stop-script option?


Redefinition of:
Ingo_Script::$_supportStopScript
Does the driver support the stop-script option?
array $_tests = array(
'contains', 'not contain', 'is', 'not is', 'begins with',
'not begins with', 'ends with', 'not ends with', 'exists', 'not exist',
'less than', 'less than or equal to', 'equal', 'not equal',
'greater than', 'greater than or equal to', 'regex', 'matches',
'not matches'
)
(line 50)

The list of tests allowed (implemented) for this driver.


Redefinition of:
Ingo_Script::$_tests
The list of tests allowed (implemented) for this driver.
array $_types = array(
INGO_STORAGE_TYPE_HEADER,
INGO_STORAGE_TYPE_SIZE,
INGO_STORAGE_TYPE_BODY
)
(line 63)

The types of tests allowed (implemented) for this driver.


Redefinition of:
Ingo_Script::$_types
The types of tests allowed (implemented) for this driver.

Inherited Variables

Inherited from Ingo_Script

Ingo_Script::$_ondemand
Ingo_Script::$_params
Ingo_Script::$_special_types
Methods
check (line 172)

Checks if all rules are valid.

  • return: True if all rules are valid, an error message otherwise.
boolean|string check ()
escapeString (line 154)

Escape a string according to Sieve RFC 3028 [2.4.2].

  • return: The escaped string.
string escapeString (string $string, [boolean $regexmode = false])
  • string $string: The string to escape.
  • boolean $regexmode: Is the escaped string a regex value? Defaults to no.
generate (line 470)

Generates the Sieve script to do the filtering specified in the rules.

  • return: The Sieve script.
string generate ()

Redefinition of:
Ingo_Script::generate()
Generates the script to do the filtering specified in the rules.
requires (line 190)

Returns a list of sieve extensions required for this rule and any sub-rules.

  • return: A Sieve extension list.
array requires ()
toCode (line 116)

Returns a script previously generated with generate().

  • return: The Sieve script.
string toCode ()

Redefinition of:
Ingo_Script::toCode()
Returns a script previously generated with generate().
_addBlacklistBlocks (line 246)

Adds all blocks necessary for the blacklist rule.

void _addBlacklistBlocks ()
_addForwardBlocks (line 203)

Adds all blocks necessary for the forward rule.

void _addForwardBlocks ()
_addSpamBlocks (line 423)

Adds all blocks necessary for the spam rule.

void _addSpamBlocks ()
_addVacationBlocks (line 344)

Adds all blocks necessary for the vacation rule.

void _addVacationBlocks ()
_addWhitelistBlocks (line 320)

Adds all blocks necessary for the whitelist rule.

void _addWhitelistBlocks ()

Inherited Methods

Inherited From Ingo_Script

 Ingo_Script::Ingo_Script()
 Ingo_Script::apply()
 Ingo_Script::availableActions()
 Ingo_Script::availableCategories()
 Ingo_Script::availableTests()
 Ingo_Script::availableTypes()
 Ingo_Script::canApply()
 Ingo_Script::caseSensitive()
 Ingo_Script::excludeRegexp()
 Ingo_Script::factory()
 Ingo_Script::generate()
 Ingo_Script::generateAvailable()
 Ingo_Script::imapFlags()
 Ingo_Script::perform()
 Ingo_Script::performAvailable()
 Ingo_Script::specialTypes()
 Ingo_Script::stopScript()
 Ingo_Script::toCode()

Documentation generated on Sun, 30 Jan 2011 05:29:28 +0000 by phpDocumentor 1.4.3