PHP Class Ingo_Script_Sieve_If, horde

Author: Mike Cochrane ([email protected])
Author: Jan Schneider ([email protected])
Inheritance: extends Ingo_Script_Sieve_Base
Show file Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_actions array A list of Ingo_Script_Sieve_Action objects that go into the if clause.
$_else Ingo_Script_Sieve_Else A Ingo_Script_Sieve_Else object that creates an optional else clause.
$_elsifs array A list of Ingo_Script_Sieve_Elseif objects that create optional elsif clauses.
$_test Ingo_Script_Sieve_Test The Ingo_Script_Sieve_Test object for the if test.

Public Methods

Method Description
__construct ( Ingo_Script_Sieve_Test $test = null ) Constructor.
addElsif ( $elsif )
check ( ) : boolean | string Checks if all sub-rules are valid.
generate ( ) : string Returns a script snippet representing this rule and any sub-rules.
getActions ( )
getElse ( )
getElsifs ( )
getTest ( )
requires ( ) : array Returns a list of sieve extensions required for this rule and any sub-rules.
setActions ( $actions )
setElse ( $else )
setElsifs ( $elsifs )
setTest ( $test )

Method Details

__construct() public method

Constructor.
public __construct ( Ingo_Script_Sieve_Test $test = null )
$test Ingo_Script_Sieve_Test A Ingo_Script_Sieve_Test object.

addElsif() public method

public addElsif ( $elsif )

check() public method

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

generate() public method

Returns a script snippet representing this rule and any sub-rules.
public generate ( ) : string
return string A Sieve script snippet.

getActions() public method

public getActions ( )

getElse() public method

public getElse ( )

getElsifs() public method

public getElsifs ( )

getTest() public method

public getTest ( )

requires() public method

Returns a list of sieve extensions required for this rule and any sub-rules.
public requires ( ) : array
return array A Sieve extension list.

setActions() public method

public setActions ( $actions )

setElse() public method

public setElse ( $else )

setElsifs() public method

public setElsifs ( $elsifs )

setTest() public method

public setTest ( $test )

Property Details

$_actions protected property

A list of Ingo_Script_Sieve_Action objects that go into the if clause.
protected array $_actions
return array

$_else protected property

A Ingo_Script_Sieve_Else object that creates an optional else clause.
protected Ingo_Script_Sieve_Else $_else
return Ingo_Script_Sieve_Else

$_elsifs protected property

A list of Ingo_Script_Sieve_Elseif objects that create optional elsif clauses.
protected array $_elsifs
return array

$_test protected property

The Ingo_Script_Sieve_Test object for the if test.
protected Ingo_Script_Sieve_Test $_test
return Ingo_Script_Sieve_Test