\Ingo_Script_Sieve_If

The Ingo_Script_Sieve_If class represents a Sieve If Statement.

Summary

Methods
Properties
Constants
requires()
__construct()
getTest()
setTest()
getActions()
setActions()
getElsifs()
setElsifs()
addElsif()
getElse()
setElse()
generate()
check()
No public properties found
No constants found
No protected methods found
$_test
$_actions
$_elsifs
$_else
N/A
No private methods found
No private properties found
N/A

Properties

$_test

$_test : \Ingo_Script_Sieve_Test

The Ingo_Script_Sieve_Test object for the if test.

Type

\Ingo_Script_Sieve_Test

$_actions

$_actions : array

A list of Ingo_Script_Sieve_Action objects that go into the if clause.

Type

array

$_elsifs

$_elsifs : array

A list of Ingo_Script_Sieve_Elseif objects that create optional elsif clauses.

Type

array

$_else

$_else : \Ingo_Script_Sieve_Else

A Ingo_Script_Sieve_Else object that creates an optional else clause.

Type

\Ingo_Script_Sieve_Else

Methods

requires()

requires() : array

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

Returns

array —

A Sieve extension list.

__construct()

__construct(\Ingo_Script_Sieve_Test  $test = null) 

Constructor.

Parameters

\Ingo_Script_Sieve_Test $test

A Ingo_Script_Sieve_Test object.

getTest()

getTest() 

setTest()

setTest(  $test) 

Parameters

$test

getActions()

getActions() 

setActions()

setActions(  $actions) 

Parameters

$actions

getElsifs()

getElsifs() 

setElsifs()

setElsifs(  $elsifs) 

Parameters

$elsifs

addElsif()

addElsif(  $elsif) 

Parameters

$elsif

getElse()

getElse() 

setElse()

setElse(  $else) 

Parameters

$else

generate()

generate() : string

Returns a script snippet representing this rule and any sub-rules.

Returns

string —

A Sieve script snippet.

check()

check() : boolean|string

Checks if all sub-rules are valid.

Returns

boolean|string —

True if all rules are valid, an error message otherwise.