PHP Class Ingo_Script_Procmail_Recipe, horde

Author: Ben Chavet ([email protected])
Author: Jan Schneider ([email protected])
Inheritance: implements Ingo_Script_Item
Show file Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_action
$_conditions
$_disable
$_flags
$_params
$_valid

Public Methods

Method Description
__construct ( array $params = [], array $scriptparams = [] ) Constructs a new procmail recipe.
addCondition ( array $condition = [] ) Adds a condition to the recipe.
addFlag ( string $flag ) Adds a flag to the recipe.
generate ( ) : string Generates procmail code to represent the recipe.
procmailPath ( string $folder ) : string Returns a procmail-ready mailbox path, converting IMAP folder pathname conventions as necessary.

Method Details

__construct() public method

Constructs a new procmail recipe.
public __construct ( array $params = [], array $scriptparams = [] )
$params array Array of parameters. REQUIRED FIELDS: 'action' OPTIONAL FIELDS: 'action-value' (only used if the 'action' requires it) 'disable'
$scriptparams array Array of parameters passed to Ingo_Script_Procmail.

addCondition() public method

Adds a condition to the recipe.
public addCondition ( array $condition = [] )
$condition array Array of parameters. Required keys are 'field' and 'value'. 'case' is an optional key.

addFlag() public method

Adds a flag to the recipe.
public addFlag ( string $flag )
$flag string String of flags to append to the current flags.

generate() public method

Generates procmail code to represent the recipe.
public generate ( ) : string
return string Procmail code to represent the recipe.

procmailPath() public method

Returns a procmail-ready mailbox path, converting IMAP folder pathname conventions as necessary.
public procmailPath ( string $folder ) : string
$folder string The IMAP folder name.
return string The procmail mailbox path.

Property Details

$_action protected property

protected $_action

$_conditions protected property

protected $_conditions

$_disable protected property

protected $_disable

$_flags protected property

protected $_flags

$_params protected property

protected $_params

$_valid protected property

protected $_valid