The Ingo_Script:: class provides a common abstracted interface to the
script-generation subclasses.
See the enclosed file LICENSE for license information (ASL). If you
did not receive this file, see http://www.horde.org/licenses/apache.
Methods summary
public static
Ingo_Script
|
#
factory( string $script, array $params = array() )
Attempts to return a concrete instance based on $script.
Attempts to return a concrete instance based on $script.
Parameters
- $script
- The type of subclass to return.
- $params
- <p>Hash containing additional paramters to be
passed to the subclass' constructor.</p>
Returns
Throws
|
public
|
#
__construct( array $params = array() )
Constructor.
Parameters
- $params
- A hash containing parameters needed.
|
public
string
|
#
excludeRegexp( )
Returns a regular expression that should catch mails coming from most
daemons, mailing list, newsletters, and other bulk.
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.
Returns
string A regular expression.
|
public
array
|
#
availableActions( )
Returns the available actions for this driver.
Returns the available actions for this driver.
Returns
array The list of available actions.
|
public
array
|
#
availableCategories( )
Returns the available categories for this driver.
Returns the available categories for this driver.
Returns
array The list of categories.
|
public
array
|
#
availableTests( )
Returns the available tests for this driver.
Returns the available tests for this driver.
Returns
array The list of tests actions.
|
public
array
|
#
availableTypes( )
Returns the available test types for this driver.
Returns the available test types for this driver.
Returns
array The list of test types.
|
public
array
|
#
specialTypes( )
Returns any test types that are special for this driver.
Returns any test types that are special for this driver.
Returns
array The list of special types
|
public
boolean
|
#
caseSensitive( )
Returns if this driver allows case sensitive searches.
Returns if this driver allows case sensitive searches.
Returns
boolean Does this driver allow case sensitive searches?
|
public
boolean
|
#
imapFlags( )
Returns if this driver allows IMAP flags to be set.
Returns if this driver allows IMAP flags to be set.
Returns
boolean Does this driver allow IMAP flags to be set?
|
public
boolean
|
#
stopScript( )
Returns if this driver supports the stop-script option.
Returns if this driver supports the stop-script option.
Returns
boolean Does this driver support the stop-script option?
|
public
string
|
#
toCode( )
Returns a script previously generated with generate().
Returns a script previously generated with generate().
Returns
string The script.
|
public
boolean
|
#
generateAvailable( )
Can this driver generate a script file?
Can this driver generate a script file?
Returns
boolean True if generate() is available, false if not.
|
public
string
|
#
generate( )
Generates the script to do the filtering specified in
the rules.
Generates the script to do the filtering specified in
the rules.
Returns
string The script.
|
public
array
|
#
additionalScripts( )
Returns any additional scripts that need to be sent to the transport
layer.
Returns any additional scripts that need to be sent to the transport
layer.
Returns
array A list of scripts with script names as keys and script
code as values.
|
public
boolean
|
#
performAvailable( )
Can this driver perform on demand filtering?
Can this driver perform on demand filtering?
Returns
boolean True if perform() is available, false if not.
|
public
boolean
|
#
perform( array $params = array() )
Perform the filtering specified in the rules.
Perform the filtering specified in the rules.
Parameters
- $params
- The parameter array.
Returns
boolean True if filtering performed, false if not.
|
public
boolean
|
#
canApply( )
Is the apply() function available?
Is the apply() function available?
Returns
boolean True if apply() is available, false if not.
|
public
boolean
|
#
apply( )
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.
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.
Returns
boolean See perform().
|