Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
CompositeFilter Class Reference
Inheritance diagram for CompositeFilter:
PersistableFilter Filter DataObject GenericMultiplexerFilter GenericSequencerFilter

Public Member Functions

 _getCompositeSettingName ($settingName)
 
_getSubfilterSetting ($settingName)
 
 _resolveCompositeSettingName ($compositeSettingName)
 
 addFilter (&$filter)
 
 CompositeFilter (&$filterGroup, $displayName=null)
 
 getData ($key, $locale=null)
 
getFilter ($seq)
 
getFilters ()
 
 getInternalSettings ()
 
 getLocalizedSettingNames ()
 
getSetting ($settingName)
 
 getSettingNames ()
 
getSettings ()
 
 getSettingsMapping ()
 
 getSettingsMappingForSetting ($settingName)
 
 hasData ($key, $locale=null)
 
 hasSettings ()
 
 isCompatibleWithRuntimeEnvironment ()
 
 setData ($key, $value, $locale=null)
 
 setSettingsMapping ($settingsMapping)
 
- Public Member Functions inherited from PersistableFilter
 addSetting (&$setting)
 
 getClassName ()
 
getFilterGroup ()
 
 getInternalSettings ()
 
 getIsTemplate ()
 
 getLocalizedSettingNames ()
 
 getParentFilterId ()
 
getSetting ($settingName)
 
 getSettingNames ()
 
getSettings ()
 
 hasSetting ($settingName)
 
 hasSettings ()
 
 PersistableFilter (&$filterGroup)
 
 setIsTemplate ($isTemplate)
 
 setParentFilterId ($parentFilterId)
 
 tempGroup ($inputType, $outputType)
 
- Public Member Functions inherited from Filter
 addError ($message)
 
 clearErrors ()
 
execute (&$input)
 
 Filter ($inputType, $outputType)
 
 getDisplayName ()
 
 getErrors ()
 
getInputType ()
 
getLastInput ()
 
getLastOutput ()
 
getOutputType ()
 
getRuntimeEnvironment ()
 
 getSeq ()
 
 hasErrors ()
 
 isCompatibleWithRuntimeEnvironment ()
 
process (&$input)
 
 setDisplayName ($displayName)
 
 setRuntimeEnvironment (&$runtimeEnvironment)
 
 setSeq ($seq)
 
 setTransformationType (&$inputType, &$outputType)
 
 supportedRuntimeEnvironmentSettings ()
 
 supports (&$input, &$output)
 
 supportsAsInput (&$input)
 
- Public Member Functions inherited from DataObject
 addSupportedMetadataAdapter (&$metadataAdapter)
 
 DataObject ($callHooks=true)
 
extractMetadata (&$metadataSchema)
 
 getAdditionalMetadataFieldNames ()
 
getAllData ()
 
getData ($key, $locale=null)
 
 getHasLoadableAdapters ()
 
 getId ()
 
 getLocaleMetadataFieldNames ()
 
getLocalizedData ($key)
 
 getMetadataFieldNames ($translated=true)
 
 getSetMetadataFieldNames ($translated=true)
 
getSupportedExtractionAdapters ()
 
getSupportedInjectionAdapters ()
 
getSupportedMetadataSchemas ()
 
 hasData ($key, $locale=null)
 
 injectMetadata (&$metadataDescription)
 
 removeSupportedMetadataAdapter ($metadataSchemaName)
 
 setAllData (&$data)
 
 setData ($key, $value, $locale=null)
 
 setHasLoadableAdapters ($hasLoadableAdapters)
 
 setId ($id)
 
upcastTo (&$targetObject)
 

Additional Inherited Members

- Public Attributes inherited from DataObject
 $_data = array()
 

Detailed Description

An abstract base class for generic filters that compose other filters into filter networks.

Definition at line 18 of file CompositeFilter.inc.php.

Member Function Documentation

CompositeFilter::_getCompositeSettingName (   $settingName)

Get the composite setting name for a mapped setting. If the setting is mapped to several sub-filters then we assume that they are identical and return only the first one.

Parameters
$settingNamestring
Returns
$compositeSettingName string

Definition at line 318 of file CompositeFilter.inc.php.

References getSettingsMappingForSetting().

Referenced by _getSubfilterSetting(), getData(), and hasData().

& CompositeFilter::_getSubfilterSetting (   $settingName)

Get a setting object from a sub-filter. If the setting mapping points to several sub-filters then we assume that those settings are identical and will return only the first one.

Parameters
$settingNamestring a mapped sub-filter setting
Returns
FilterSetting

Definition at line 334 of file CompositeFilter.inc.php.

References _getCompositeSettingName(), and _resolveCompositeSettingName().

Referenced by getSetting(), and getSettings().

CompositeFilter::_resolveCompositeSettingName (   $compositeSettingName)

Split a composite setting name and identify the corresponding sub-filter and setting name.

Parameters
$compositeSettingNamestring
Returns
array the first entry will be the sub-filter and the second entry the setting name.

Definition at line 348 of file CompositeFilter.inc.php.

References getFilter().

Referenced by _getSubfilterSetting(), getData(), hasData(), and setData().

CompositeFilter::addFilter ( $filter)

Adds a filter to the filter list.

NB: A filter that is using the sequence number of another filter will not be added.

Parameters
$filterFilter
Returns
integer the filter's sequence number, null if the sequence number of the filter had already been set before by a different filter and the filter has not been added.

Definition at line 50 of file CompositeFilter.inc.php.

CompositeFilter::CompositeFilter ( $filterGroup,
  $displayName = null 
)

Constructor

Parameters
$filterGroupFilterGroup
$displayNamestring

Definition at line 30 of file CompositeFilter.inc.php.

References Filter\setDisplayName().

CompositeFilter::getData (   $key,
  $locale = null 
)
& CompositeFilter::getFilter (   $seq)

Identify a filter by sequence number.

Parameters
$seqinteger
Returns
Filter

Definition at line 77 of file CompositeFilter.inc.php.

Referenced by _resolveCompositeSettingName().

& CompositeFilter::getFilters ( )

Gets the array of subfilters that are part of the composite filter.

Definition at line 89 of file CompositeFilter.inc.php.

Referenced by isCompatibleWithRuntimeEnvironment(), GenericSequencerFilter\process(), and GenericMultiplexerFilter\process().

CompositeFilter::getInternalSettings ( )
See Also
PersistableFilter::getInternalSettings()

Definition at line 229 of file CompositeFilter.inc.php.

Referenced by getData(), hasData(), and setData().

CompositeFilter::getLocalizedSettingNames ( )
See Also
PersistableFilter::getLocalizedSettingNames()

Definition at line 213 of file CompositeFilter.inc.php.

Referenced by setData().

& CompositeFilter::getSetting (   $settingName)
See Also
PersistableFilter::getSetting()

Definition at line 153 of file CompositeFilter.inc.php.

References _getSubfilterSetting().

CompositeFilter::getSettingNames ( )
See Also
PersistableFilter::getSettingNames()

Definition at line 189 of file CompositeFilter.inc.php.

Referenced by getData(), and setData().

& CompositeFilter::getSettings ( )
CompositeFilter::getSettingsMapping ( )

Get the settings mapping.

Definition at line 124 of file CompositeFilter.inc.php.

References getData().

Referenced by getSettings(), and hasSettings().

CompositeFilter::getSettingsMappingForSetting (   $settingName)

Get a settings mapping

Returns
array

Definition at line 137 of file CompositeFilter.inc.php.

References getData().

Referenced by _getCompositeSettingName(), and setData().

CompositeFilter::hasData (   $key,
  $locale = null 
)
CompositeFilter::hasSettings ( )
See Also
PersistableFilter::hasSettings()

Definition at line 179 of file CompositeFilter.inc.php.

References getSettingsMapping().

CompositeFilter::isCompatibleWithRuntimeEnvironment ( )
CompositeFilter::setData (   $key,
  $value,
  $locale = null 
)
CompositeFilter::setSettingsMapping (   $settingsMapping)

Set the settings mappings

Parameters
$settingsMappingarray A settings mapping is of the form: array( $settingName => array($targetSetting1, $targetSetting2, ...), ... )

$settingName stands for a setting to be used as a placeholder in the composite filter for the target settings.

The target settings are of the form "seq_settingName" whereby "seq" stands for the sequence number of the target filter and "settingName" for the corresponding setting there. When you give more than one target setting then all target settings will be kept synchronous.

You have to map all sub-filter settings that you wish to access from the composite filter.

Definition at line 117 of file CompositeFilter.inc.php.

References setData().


The documentation for this class was generated from the following file: