Ingo_Script_Sieve_Test_Anyof
extends Ingo_Script_Sieve_Test
in package
The Ingo_Script_Sieve_Test_Anyof class represents an Anyof test structure.
Equivalent to a logical OR of all the tests it contains.
Tags
Table of Contents
- $_tests : mixed
- $_vars : array<string|int, mixed>
- Any necessary test parameters.
- __construct() : mixed
- Constructor.
- addTest() : mixed
- check() : bool|string
- Checks if all sub-rules are valid.
- generate() : string
- Returns a script snippet representing this rule and any sub-rules.
- getTests() : mixed
- requires() : array<string|int, mixed>
- Returns a list of sieve extensions required for this rule and any sub-rules.
Properties
$_tests
protected
mixed
$_tests
= array()
$_vars
Any necessary test parameters.
protected
array<string|int, mixed>
$_vars
= array()
Methods
__construct()
Constructor.
public
__construct([mixed $test = null ]) : mixed
Parameters
- $test : mixed = null
-
An Ingo_Script_Sieve_Test object or a list of Ingo_Script_Sieve_Test objects.
Return values
mixed —addTest()
public
addTest(mixed $test) : mixed
Parameters
- $test : 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.
getTests()
public
getTests() : 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.