Open Monograph Press  1.1
 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)
 
- 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)
 
 supports (&$input, &$output)
 
 supportsAsInput (&$input)
 
- Public Member Functions inherited from DataObject
 addSupportedMetadataAdapter ($metadataAdapter)
 
 DataObject ()
 
 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)
 

Public Attributes

 $_filters = array()
 
 $_maxSeq = 0
 
- Public Attributes inherited from PersistableFilter
 $_settings = array()
 
- Public Attributes inherited from Filter
 $_errors = array()
 
 $_runtimeEnvironment = false
 
- Public Attributes inherited from DataObject
 $_data = array()
 
 $_extractionAdaptersLoaded = false
 
 $_hasLoadableAdapters = false
 
 $_injectionAdaptersLoaded = false
 
 $_metadataExtractionAdapters = array()
 
 $_metadataInjectionAdapters = array()
 

Additional Inherited Members

- Static Public Member Functions inherited from PersistableFilter
static tempGroup ($inputType, $outputType)
 
- Static Public Member Functions inherited from Filter
static supportedRuntimeEnvironmentSettings ()
 

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 324 of file CompositeFilter.inc.php.

References _resolveCompositeSettingName().

& 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 340 of file CompositeFilter.inc.php.

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 354 of file CompositeFilter.inc.php.

Referenced by _getCompositeSettingName().

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 56 of file CompositeFilter.inc.php.

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

Constructor

Parameters
$filterGroupFilterGroup
$displayNamestring

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

& CompositeFilter::getData (   $key,
  $locale = null 
)
See Also
DataObject::getData()

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

& CompositeFilter::getFilter (   $seq)

Identify a filter by sequence number.

Parameters
$seqinteger
Returns
Filter

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

& CompositeFilter::getFilters ( )

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

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

Referenced by getInternalSettings(), and GenericSequencerFilter\process().

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

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

References getFilters().

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

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

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

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

CompositeFilter::getSettingsMapping ( )

Get the settings mapping.

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

CompositeFilter::getSettingsMappingForSetting (   $settingName)

Get a settings mapping

Returns
array

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

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

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

CompositeFilter::hasSettings ( )
See Also
PersistableFilter::hasSettings()

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

CompositeFilter::isCompatibleWithRuntimeEnvironment ( )
CompositeFilter::setData (   $key,
  $value,
  $locale = null 
)
See Also
DataObject::setData()

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

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 123 of file CompositeFilter.inc.php.

Member Data Documentation

array CompositeFilter::$_filters = array()

An ordered array of sub-filters

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

integer CompositeFilter::$_maxSeq = 0

the max sequence number that has been attributed so far

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


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