PHP Class Ingo_Script_Sieve, horde

Author: Mike Cochrane ([email protected])
Author: Jan Schneider ([email protected])
Inheritance: extends Ingo_Script_Base
显示文件 Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_actions array The list of actions allowed (implemented) for this driver.
$_categories array The categories of filtering allowed.
$_endBlocks array The blocks that have to appear at the end of the code.
$_features array A list of driver features.
$_tests array The list of tests allowed (implemented) for this driver.
$_types array The types of tests allowed (implemented) for this driver.

Public Methods

Method Description
check ( ) : boolean | string Checks if all rules are valid.
escapeString ( string $string, boolean $regexmode = false ) : string Escape a string according to Sieve RFC 3028 [2.4.2].
generate ( ) : array Generates the scripts to do the filtering specified in the rules.

Protected Methods

Method Description
_addBlacklistBlocks ( Ingo_Rule $rule ) Adds all blocks necessary for the blacklist rule.
_addForwardBlocks ( Ingo_Rule $rule ) Adds all blocks necessary for the forward rule.
_addSpamBlocks ( Ingo_Rule $rule ) Adds all blocks necessary for the spam rule.
_addVacationBlocks ( Ingo_Rule $rule ) Adds all blocks necessary for the vacation rule.
_addWhitelistBlocks ( Ingo_Rule $rule ) Adds all blocks necessary for the whitelist rule.
_generate ( ) Generates the Sieve script to do the filtering specified in the rules.

Method Details

_addBlacklistBlocks() protected method

Adds all blocks necessary for the blacklist rule.
protected _addBlacklistBlocks ( Ingo_Rule $rule )
$rule Ingo_Rule Rule object.

_addForwardBlocks() protected method

Adds all blocks necessary for the forward rule.
protected _addForwardBlocks ( Ingo_Rule $rule )
$rule Ingo_Rule Rule object.

_addSpamBlocks() protected method

Adds all blocks necessary for the spam rule.
protected _addSpamBlocks ( Ingo_Rule $rule )
$rule Ingo_Rule Rule object.

_addVacationBlocks() protected method

Adds all blocks necessary for the vacation rule.
protected _addVacationBlocks ( Ingo_Rule $rule )
$rule Ingo_Rule Rule object.

_addWhitelistBlocks() protected method

Adds all blocks necessary for the whitelist rule.
protected _addWhitelistBlocks ( Ingo_Rule $rule )
$rule Ingo_Rule Rule object.

_generate() protected method

Generates the Sieve script to do the filtering specified in the rules.
protected _generate ( )

check() public method

Checks if all rules are valid.
public check ( ) : boolean | string
return boolean | string True if all rules are valid, an error message otherwise.

escapeString() public static method

Escape a string according to Sieve RFC 3028 [2.4.2].
public static escapeString ( string $string, boolean $regexmode = false ) : string
$string string The string to escape.
$regexmode boolean Is the escaped string a regex value? Defaults to no.
return string The escaped string.

generate() public method

Generates the scripts to do the filtering specified in the rules.
public generate ( ) : array
return array The scripts.

Property Details

$_actions protected_oe property

The list of actions allowed (implemented) for this driver.
protected array $_actions
return array

$_categories protected_oe property

The categories of filtering allowed.
protected array $_categories
return array

$_endBlocks protected_oe property

The blocks that have to appear at the end of the code.
protected array $_endBlocks
return array

$_features protected_oe property

A list of driver features.
protected array $_features
return array

$_tests protected_oe property

The list of tests allowed (implemented) for this driver.
protected array $_tests
return array

$_types protected_oe property

The types of tests allowed (implemented) for this driver.
protected array $_types
return array