Ingo_Script_Sieve_If
extends Ingo_Script_Sieve_Base
in package
The Ingo_Script_Sieve_If class represents a Sieve If Statement.
Tags
Table of Contents
- $_actions : array<string|int, mixed>
- 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<string|int, mixed>
- 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.
- __construct() : mixed
- Constructor.
- addElsif() : mixed
- check() : bool|string
- Checks if all sub-rules are valid.
- generate() : string
- Returns a script snippet representing this rule and any sub-rules.
- getActions() : mixed
- getElse() : mixed
- getElsifs() : mixed
- getTest() : mixed
- requires() : array<string|int, mixed>
- Returns a list of sieve extensions required for this rule and any sub-rules.
- setActions() : mixed
- setElse() : mixed
- setElsifs() : mixed
- setTest() : mixed
Properties
$_actions
A list of Ingo_Script_Sieve_Action objects that go into the if clause.
protected
array<string|int, mixed>
$_actions
= array()
$_else
A Ingo_Script_Sieve_Else object that creates an optional else clause.
protected
Ingo_Script_Sieve_Else
$_else
$_elsifs
A list of Ingo_Script_Sieve_Elseif objects that create optional elsif clauses.
protected
array<string|int, mixed>
$_elsifs
= array()
$_test
The Ingo_Script_Sieve_Test object for the if test.
protected
Ingo_Script_Sieve_Test
$_test
Methods
__construct()
Constructor.
public
__construct([Ingo_Script_Sieve_Test $test = null ]) : mixed
Parameters
- $test : Ingo_Script_Sieve_Test = null
-
A Ingo_Script_Sieve_Test object.
Return values
mixed —addElsif()
public
addElsif(mixed $elsif) : mixed
Parameters
- $elsif : mixed
Return values
mixed —check()
Checks if all sub-rules are valid.
public
check() : bool|string
Return values
bool|string —True if all rules are valid, an error message otherwise.
generate()
Returns a script snippet representing this rule and any sub-rules.
public
generate() : string
Return values
string —A Sieve script snippet.
getActions()
public
getActions() : mixed
Return values
mixed —getElse()
public
getElse() : mixed
Return values
mixed —getElsifs()
public
getElsifs() : mixed
Return values
mixed —getTest()
public
getTest() : mixed
Return values
mixed —requires()
Returns a list of sieve extensions required for this rule and any sub-rules.
public
requires() : array<string|int, mixed>
Return values
array<string|int, mixed> —A Sieve extension list.
setActions()
public
setActions(mixed $actions) : mixed
Parameters
- $actions : mixed
Return values
mixed —setElse()
public
setElse(mixed $else) : mixed
Parameters
- $else : mixed
Return values
mixed —setElsifs()
public
setElsifs(mixed $elsifs) : mixed
Parameters
- $elsifs : mixed
Return values
mixed —setTest()
public
setTest(mixed $test) : mixed
Parameters
- $test : mixed