PHP 클래스 Ingo_Script_Base, horde

저자: Brent J. Nordquist ([email protected])
저자: Jan Schneider ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_actions array This SHOULD be defined in each subclass.
$_categories array This SHOULD be defined in each subclass.
$_categoryFeatures array This is an associative array with the keys taken from $_actions, each value is a list of strings with the supported feature names. An absent key is interpreted as "all features supported".
$_features array A list of driver features.
$_generated boolean Have the recipes been generated yet?
$_params array The script class' additional parameters.
$_recipes array The recipes that make up the code.
$_special_types array A list of any special types that this driver supports.
$_tests array This SHOULD be defined in each subclass.
$_types array This SHOULD be defined in each subclass.

공개 메소드들

메소드 설명
__construct ( array $params = [] ) Constructor.
activate ( boolean $activate = true, boolean $auto_update = true ) Connects to the backend, uploads the scripts and sets them active.
availableActions ( ) : array Returns the available actions for this driver.
availableCategories ( ) : array Returns the available categories for this driver.
availableCategoryFeatures ( $category ) : array Returns the supported form fields for this driver.
availableTests ( ) : array Returns the available tests for this driver.
availableTypes ( ) : array Returns the available test types for this driver.
canPerform ( ) : boolean Is the perform() function available right now?
excludeRegexp ( ) : string Returns a regular expression that should catch mails coming from most daemons, mailing list, newsletters, and other bulk.
generate ( ) : array Generates the scripts to do the filtering specified in the rules.
hasFeature ( string $feature ) : boolean Returns whether the script driver supports a certain feature.
perform ( integer $change = null ) Performs the filtering specified in the rules.
setParams ( array $params = [] ) : Ingo_Script Updates the parameters.
specialTypes ( ) : array Returns any test types that are special for this driver.

보호된 메소드들

메소드 설명
_addItem ( integer $rule, Ingo_Script_Item $item, string $name = null ) Adds an item to the recipe list.
_generate ( ) Generates the scripts to do the filtering specified in the rules.
_insertItem ( integer $rule, Ingo_Script_Item $item, string $name = null, $position ) Inserts an item into the recipe list.
_perform ( $change )
_validRule ( Ingo_Rule $rule ) : boolean Is this a valid rule?

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $params = [] )
$params array A hash containing parameters needed.

_addItem() 보호된 메소드

Adds an item to the recipe list.
protected _addItem ( integer $rule, Ingo_Script_Item $item, string $name = null )
$rule integer One of the Ingo::RULE_* constants.
$item Ingo_Script_Item An item to add to the recipe list.
$name string A script name.

_generate() 보호된 메소드

Generates the scripts to do the filtering specified in the rules.
protected _generate ( )

_insertItem() 보호된 메소드

Inserts an item into the recipe list.
protected _insertItem ( integer $rule, Ingo_Script_Item $item, string $name = null, $position )
$rule integer One of the Ingo::RULE_* constants.
$item Ingo_Script_Item An item to add to the recipe list.
$name string A script name.

_perform() 보호된 메소드

또한 보기: perform()
protected _perform ( $change )

_validRule() 보호된 메소드

Is this a valid rule?
protected _validRule ( Ingo_Rule $rule ) : boolean
$rule Ingo_Rule The rule object.
리턴 boolean Whether the rule is valid for this driver.

activate() 공개 메소드

Connects to the backend, uploads the scripts and sets them active.
public activate ( boolean $activate = true, boolean $auto_update = true )
$activate boolean Activate the script?
$auto_update boolean Only update if auto_update is active?

availableActions() 공개 메소드

Returns the available actions for this driver.
public availableActions ( ) : array
리턴 array The list of available actions.

availableCategories() 공개 메소드

Returns the available categories for this driver.
public availableCategories ( ) : array
리턴 array The list of categories.

availableCategoryFeatures() 공개 메소드

Returns the supported form fields for this driver.
public availableCategoryFeatures ( $category ) : array
리턴 array An array with the supported field names of the requested category.

availableTests() 공개 메소드

Returns the available tests for this driver.
public availableTests ( ) : array
리턴 array The list of tests actions.

availableTypes() 공개 메소드

Returns the available test types for this driver.
public availableTypes ( ) : array
리턴 array The list of test types.

canPerform() 공개 메소드

This is not a duplication of hasFeature() because drivers might override this to do real-time checks if on-demand filtering is not only available theoretically but practically in this very moment.
public canPerform ( ) : boolean
리턴 boolean True if perform() is available, false if not.

excludeRegexp() 공개 메소드

This is the expression used for procmail's FROM_DAEMON, including all mailinglist headers.
public excludeRegexp ( ) : string
리턴 string A regular expression.

generate() 공개 메소드

Generates the scripts to do the filtering specified in the rules.
public generate ( ) : array
리턴 array The scripts.

hasFeature() 공개 메소드

Returns whether the script driver supports a certain feature.
public hasFeature ( string $feature ) : boolean
$feature string A feature name.
리턴 boolean True if this feature is supported.

perform() 공개 메소드

Performs the filtering specified in the rules.
public perform ( integer $change = null )
$change integer The timestamp of the latest rule change during the current session (uses session value if null).

setParams() 공개 메소드

Updates the parameters.
public setParams ( array $params = [] ) : Ingo_Script
$params array A hash containing parameters.
리턴 Ingo_Script This object, for chaining.

specialTypes() 공개 메소드

Returns any test types that are special for this driver.
public specialTypes ( ) : array
리턴 array The list of special types

프로퍼티 상세

$_actions 보호되어 있는 프로퍼티

This SHOULD be defined in each subclass.
protected array $_actions
리턴 array

$_categories 보호되어 있는 프로퍼티

This SHOULD be defined in each subclass.
protected array $_categories
리턴 array

$_categoryFeatures 보호되어 있는 프로퍼티

This is an associative array with the keys taken from $_actions, each value is a list of strings with the supported feature names. An absent key is interpreted as "all features supported".
protected array $_categoryFeatures
리턴 array

$_features 보호되어 있는 프로퍼티

A list of driver features.
protected array $_features
리턴 array

$_generated 보호되어 있는 프로퍼티

Have the recipes been generated yet?
protected bool $_generated
리턴 boolean

$_params 보호되어 있는 프로퍼티

The script class' additional parameters.
protected array $_params
리턴 array

$_recipes 보호되어 있는 프로퍼티

The recipes that make up the code.
protected array $_recipes
리턴 array

$_special_types 보호되어 있는 프로퍼티

A list of any special types that this driver supports.
protected array $_special_types
리턴 array

$_tests 보호되어 있는 프로퍼티

This SHOULD be defined in each subclass.
protected array $_tests
리턴 array

$_types 보호되어 있는 프로퍼티

This SHOULD be defined in each subclass.
protected array $_types
리턴 array