Class Ingo_Script

Description

The Ingo_Script:: class provides a common abstracted interface to the script-generation subclasses.

$Horde: ingo/lib/Script.php,v 1.30.10.11 2009/12/21 23:19:05 jan Exp $

See the enclosed file LICENSE for license information (ASL). If you did not receive this file, see http://www.horde.org/licenses/asl.php.

Located in /lib/Script.php (line 25)


	
			
Direct descendents
Class Description
 class Ingo_Script_sieve The Ingo_Script_sieve class represents a Sieve Script.
 class Ingo_Script_imap The Ingo_Script_imap:: class represents an IMAP client-side script generator.
 class Ingo_Script_procmail The Ingo_Script_procmail:: class represents a Procmail script generator.
 class Ingo_Script_maildrop The Ingo_Script_maildrop:: class represents a maildrop script generator.
Variable Summary
 array $_actions
 boolean $_casesensitive
 array $_categories
 boolean $_ondemand
 array $_params
 boolean $_scriptfile
 array $_tests
 array $_types
Method Summary
 Ingo_Script Ingo_Script ([array $params = array()])
 boolean apply ()
 array availableActions ()
 array availableTests ()
 array availableTypes ()
 boolean canApply ()
 boolean caseSensitive ()
 string excludeRegexp ()
 Ingo_Script factory (string $script, [array $params = array()])
 string generate ()
 boolean generateAvailable ()
 boolean imapFlags ()
 boolean perform ([array $params = array()])
 boolean performAvailable ()
 array specialTypes ()
 boolean stopScript ()
 string toCode ()
Variables
array $_actions = array() (line 40)

The list of actions allowed (implemented) for this driver.

This SHOULD be defined in each subclass.


Redefined in descendants as:
boolean $_casesensitive = false (line 78)

Can tests be case sensitive?


Redefined in descendants as:
array $_categories = array() (line 48)

The categories of filtering allowed.

This SHOULD be defined in each subclass.


Redefined in descendants as:
boolean $_ondemand = false (line 99)

Can this driver perform on demand filtering?


Redefined in descendants as:
array $_params = array() (line 32)

The script class' additional parameters.

boolean $_scriptfile = false (line 106)

Does the driver require a script file to be generated?


Redefined in descendants as:
array $_special_types = array() (line 71)

A list of any special types that this driver supports.


Redefined in descendants as:
boolean $_supportIMAPFlags = false (line 85)

Does the driver support setting IMAP flags?


Redefined in descendants as:
boolean $_supportStopScript = false (line 92)

Does the driver support the stop-script option?


Redefined in descendants as:
array $_tests = array() (line 56)

The list of tests allowed (implemented) for this driver.

This SHOULD be defined in each subclass.


Redefined in descendants as:
array $_types = array() (line 64)

The types of tests allowed (implemented) for this driver.

This SHOULD be defined in each subclass.


Redefined in descendants as:
Methods
Constructor Ingo_Script (line 156)

Constructor.

Ingo_Script Ingo_Script ([array $params = array()])
  • array $params: A hash containing parameters needed.
apply (line 352)

Apply the filters now.

This is essentially a wrapper around perform() that allows that function to be called from within Ingo ensuring that all necessary parameters are set.

  • return: See perform().
  • abstract:
boolean apply ()

Redefined in descendants as:
availableActions (line 198)

Returns the available actions for this driver.

  • return: The list of available actions.
array availableActions ()
availableCategories (line 208)

Returns the available categories for this driver.

  • return: The list of categories.
array availableCategories ()
availableTests (line 218)

Returns the available tests for this driver.

  • return: The list of tests actions.
array availableTests ()
availableTypes (line 228)

Returns the available test types for this driver.

  • return: The list of test types.
array availableTypes ()
canApply (line 337)

Is the apply() function available?

  • return: True if apply() is available, false if not.
boolean canApply ()

Redefined in descendants as:
caseSensitive (line 248)

Returns if this driver allows case sensitive searches.

  • return: Does this driver allow case sensitive searches?
boolean caseSensitive ()
excludeRegexp (line 188)

Returns a regular expression that should catch mails coming from most daemons, mailing list, newsletters, and other bulk.

This is the expression used for procmail's FROM_DAEMON, including all mailinglist headers.

  • return: A regular expression.
string excludeRegexp ()
factory (line 118)

Attempts to return a concrete Ingo_Script instance based on $script.

  • return: The newly created concrete Ingo_Script instance, or false on error.
Ingo_Script factory (string $script, [array $params = array()])
  • string $script: The type of Ingo_Script subclass to return.
  • array $params: Hash containing additional paramters to be passed to the subclass' constructor.
generate (line 303)

Generates the script to do the filtering specified in the rules.

  • return: The script.
  • abstract:
string generate ()

Redefined in descendants as:
generateAvailable (line 290)

Can this driver generate a script file?

  • return: True if generate() is available, false if not.
boolean generateAvailable ()
imapFlags (line 258)

Returns if this driver allows IMAP flags to be set.

  • return: Does this driver allow IMAP flags to be set?
boolean imapFlags ()
perform (line 327)

Perform the filtering specified in the rules.

  • return: True if filtering performed, false if not.
  • abstract:
boolean perform ([array $params = array()])
  • array $params: The parameter array.

Redefined in descendants as:
performAvailable (line 313)

Can this driver perform on demand filtering?

  • return: True if perform() is available, false if not.
boolean performAvailable ()
specialTypes (line 238)

Returns any test types that are special for this driver.

  • return: The list of special types
array specialTypes ()
stopScript (line 268)

Returns if this driver supports the stop-script option.

  • return: Does this driver support the stop-script option?
boolean stopScript ()
toCode (line 280)

Returns a script previously generated with generate().

  • return: The script.
  • abstract:
string toCode ()

Redefined in descendants as:

Documentation generated on Sun, 30 Jan 2011 05:29:28 +0000 by phpDocumentor 1.4.3