Ingo_Script_Sieve_Action_Flag
extends Ingo_Script_Sieve_Action
in package
The Ingo_Script_Sieve_Action_Flag class is the base class for flag actions.
It supports both imap4flags (RFC 5232) and the older, deprecated imapflags (draft-melnikov-sieve-imapflags-03) capabilities.
Tags
Table of Contents
- $_vars : array<string|int, mixed>
- Any necessary action parameters.
- __construct() : mixed
- Constructor.
- check() : bool|string
- Checks if the rule parameters are valid.
- requires() : array<string|int, mixed>
- Returns a list of sieve extensions required for this rule and any sub-rules.
- _generate() : string
- Returns a script snippet representing this rule and any sub-rules.
Properties
$_vars
Any necessary action parameters.
protected
array<string|int, mixed>
$_vars
= array()
Methods
__construct()
Constructor.
public
__construct([mixed $vars = array() ]) : mixed
Parameters
- $vars : mixed = array()
Tags
Return values
mixed —check()
Checks if the rule parameters are valid.
public
check() : bool|string
Return values
bool|string —True if this rule is valid, an error message otherwise.
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.
_generate()
Returns a script snippet representing this rule and any sub-rules.
protected
_generate(string $mode) : string
Parameters
- $mode : string
-
The sieve flag command to use. Either:
- addflag
- removeflag
Return values
string —A Sieve script snippet.