Open Journal Systems
3.3.0
|
Public Member Functions | |
_deleteSubFiltersByParentFilterId ($parentFilterId) | |
_fromRow ($row) | |
_insertSubFilters ($parentFilter) | |
_newDataObject ($filterClassName, $filterGroupId) | |
_populateSubFilters ($parentFilter) | |
configureObject ($filterClassName, $filterGroupSymbolic, $settings=array(), $asTemplate=false, $contextId=0, $subFilters=array(), $persist=true) | |
deleteObject ($filter) | |
deleteObjectById ($filterId) | |
getAdditionalFieldNames () | |
getInsertId () | |
getLocaleFieldNames () | |
getObject ($filter) | |
getObjectById ($filterId, $allowSubfilter=false) | |
getObjectsByClass ($className, $contextId=CONTEXT_ID_NONE, $getTemplates=false, $allowSubfilters=false) | |
getObjectsByGroup ($groupSymbolic, $contextId=CONTEXT_ID_NONE, $getTemplates=false, $checkRuntimeEnvironment=true) | |
getObjectsByGroupAndClass ($groupSymbolic, $className, $contextId=CONTEXT_ID_NONE, $getTemplates=false, $allowSubfilters=false) | |
getObjectsByTypeDescription ($inputTypeDescription, $outputTypeDescription, $data=null, $dataIsInput=true) | |
insertObject ($filter, $contextId=CONTEXT_ID_NONE) | |
updateDataObjectSettings ($tableName, $dataObject, $idArray) | |
updateObject ($filter) | |
![]() | |
__construct ($dataSource=null, $callHooks=true) | |
concat () | |
convertFromDB ($value, $type) | |
convertToDB ($value, &$type) | |
dateFromDB ($d) | |
datetimeFromDB ($dt) | |
datetimeToDB ($dt) | |
dateToDB ($d) | |
flushCache () | |
formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true) | |
getAffectedRows () | |
getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject) | |
getDataSource () | |
getDirectionMapping ($direction) | |
getDriver () | |
getType ($value) | |
handleError ($dataSource, $sql) | |
nullOrInt ($value) | |
replace ($table, $arrFields, $keyCols) | |
& | retrieve ($sql, $params=false, $callHooks=true) |
& | retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true) |
& | retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true) |
& | retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true) |
setCacheDir () | |
setDataSource ($dataSource) | |
update ($sql, $params=false, $callHooks=true, $dieOnError=true) | |
Data Fields | |
$additionalFieldNames | |
$localeFieldNames | |
![]() | |
$_dataSource | |
Additional Inherited Members | |
![]() | |
static | getDataChangedEvent ($elementId=null, $parentElementId=null, $content='') |
![]() | |
_getInsertId ($table='', $id='') | |
Operations for retrieving and modifying Filter objects.
The filter DAO acts as a filter registry. It allows filter providers to register transformations and filter consumers to identify available transformations that convert a given input type into a required output type.
Transformations are defined as a combination of a filter class, a pair of input/output type specifications supported by that filter implementation and a set of configuration parameters that customize the filter.
Transformations can be based on filter templates. A template is defined as a filter instance without parameterization. A flag is used to distinguish filter templates from fully parameterized filter instances.
Different filters that perform semantically related transformations (e.g. all citation parsers or all citation output filters) are clustered into filter groups (
The following additional conditions apply: 1) A single filter class may support several transformations, i.e. distinct combinations of input and output types or distinct parameterizations. Therefore the filter DAO must be able to handle several registry entries per filter class. 2) The DAO must take care to only select such transformations that are supported by the current runtime environment. 3) The DAO implementation must be scalable, fast and memory efficient.
Definition at line 44 of file FilterDAO.inc.php.
FilterDAO::_deleteSubFiltersByParentFilterId | ( | $parentFilterId | ) |
Recursively delete all sub-filters for the given parent filter.
$parentFilterId | integer |
Definition at line 573 of file FilterDAO.inc.php.
References deleteObjectById(), and DAO\retrieve().
Referenced by deleteObjectById(), and updateObject().
FilterDAO::_fromRow | ( | $row | ) |
Internal function to return a filter instance (transformation) object from a row.
$row | array |
Definition at line 482 of file FilterDAO.inc.php.
References _newDataObject(), _populateSubFilters(), fatalError(), and DAO\getDataObjectSettings().
Referenced by getObjectById(), and getObjectsByGroup().
FilterDAO::_insertSubFilters | ( | $parentFilter | ) |
Recursively insert sub-filters of the given parent filter.
$parentFilter | Filter |
Definition at line 553 of file FilterDAO.inc.php.
References insertObject().
Referenced by insertObject(), and updateObject().
FilterDAO::_newDataObject | ( | $filterClassName, | |
$filterGroupId | |||
) |
Construct a new configured filter instance (transformation).
$filterClassName | string a fully qualified class name |
$filterGroupId | integer |
Definition at line 462 of file FilterDAO.inc.php.
References fatalError(), DAORegistry\getDAO(), and instantiate().
Referenced by _fromRow().
FilterDAO::_populateSubFilters | ( | $parentFilter | ) |
Populate the sub-filters (if any) for the given parent filter.
$parentFilter | PersistableFilter |
Definition at line 520 of file FilterDAO.inc.php.
References DAO\retrieve().
Referenced by _fromRow().
FilterDAO::configureObject | ( | $filterClassName, | |
$filterGroupSymbolic, | |||
$settings = array() , |
|||
$asTemplate = false , |
|||
$contextId = 0 , |
|||
$subFilters = array() , |
|||
$persist = true |
|||
) |
Instantiates a new filter from configuration data and then installs it.
$filterClassName | string |
$filterGroupSymbolic | string |
$settings | array key-value pairs that can be directly written via DataObject::setData(). |
$asTemplate | boolean |
$contextId | integer the context the filter should be installed into |
$subFilters | array sub-filters (only allowed when the filter is a CompositeFilter) |
$persist | boolean whether to actually persist the filter |
Definition at line 72 of file FilterDAO.inc.php.
References DAORegistry\getDAO(), insertObject(), and instantiate().
FilterDAO::deleteObject | ( | $filter | ) |
Delete a filter instance (transformation).
$filter | PersistableFilter |
Definition at line 379 of file FilterDAO.inc.php.
References deleteObjectById().
FilterDAO::deleteObjectById | ( | $filterId | ) |
Delete a filter instance (transformation) by id.
$filterId | int |
Definition at line 388 of file FilterDAO.inc.php.
References _deleteSubFiltersByParentFilterId(), and DAO\update().
Referenced by _deleteSubFiltersByParentFilterId(), and deleteObject().
FilterDAO::getAdditionalFieldNames | ( | ) |
Reimplemented from DAO.
Definition at line 427 of file FilterDAO.inc.php.
References $additionalFieldNames.
FilterDAO::getInsertId | ( | ) |
Get the ID of the last inserted filter instance (transformation).
Definition at line 448 of file FilterDAO.inc.php.
Referenced by insertObject().
FilterDAO::getLocaleFieldNames | ( | ) |
Reimplemented from DAO.
Definition at line 435 of file FilterDAO.inc.php.
References $localeFieldNames.
FilterDAO::getObject | ( | $filter | ) |
Retrieve a configured filter instance (transformation)
$filter | PersistableFilter |
Definition at line 152 of file FilterDAO.inc.php.
References getObjectById().
FilterDAO::getObjectById | ( | $filterId, | |
$allowSubfilter = false |
|||
) |
Retrieve a configured filter instance (transformation) by id.
$filterId | integer |
$allowSubfilter | boolean |
Definition at line 162 of file FilterDAO.inc.php.
References _fromRow(), and DAO\retrieve().
Referenced by getObject().
FilterDAO::getObjectsByClass | ( | $className, | |
$contextId = CONTEXT_ID_NONE , |
|||
$getTemplates = false , |
|||
$allowSubfilters = false |
|||
) |
Retrieve a result set with all filter instances (transformations) that are based on the given class.
$className | string |
$contextId | integer |
$getTemplates | boolean set true if you want filter templates rather than actual transformations |
$allowSubfilters | boolean |
Definition at line 189 of file FilterDAO.inc.php.
References DAO\retrieve().
FilterDAO::getObjectsByGroup | ( | $groupSymbolic, | |
$contextId = CONTEXT_ID_NONE , |
|||
$getTemplates = false , |
|||
$checkRuntimeEnvironment = true |
|||
) |
Retrieve filter instances configured for a given context that belong to a given filter group.
Only filters supported by the current run-time environment will be returned when $checkRuntimeEnvironment is set to 'true'.
$groupSymbolic | string |
$contextId | integer returns filters from context 0 and the given filters of all contexts if set to null |
$getTemplates | boolean set true if you want filter templates rather than actual transformations |
$checkRuntimeEnvironment | boolean whether to remove filters from the result set that do not match the current run-time environment. |
Definition at line 305 of file FilterDAO.inc.php.
References _fromRow(), and DAO\retrieve().
FilterDAO::getObjectsByGroupAndClass | ( | $groupSymbolic, | |
$className, | |||
$contextId = CONTEXT_ID_NONE , |
|||
$getTemplates = false , |
|||
$allowSubfilters = false |
|||
) |
Retrieve a result set with all filter instances (transformations) within a given group that are based on the given class.
$groupSymbolic | string |
$className | string |
$contextId | integer |
$getTemplates | boolean set true if you want filter templates rather than actual transformations |
$allowSubfilters | boolean |
Definition at line 215 of file FilterDAO.inc.php.
References DAO\retrieve().
FilterDAO::getObjectsByTypeDescription | ( | $inputTypeDescription, | |
$outputTypeDescription, | |||
$data = null , |
|||
$dataIsInput = true |
|||
) |
Retrieve filters based on the supported input/output type.
$inputTypeDescription | a type description that has to match the input type |
$outputTypeDescription | a type description that has to match the output type NB: input and output type description can contain wildcards. |
$data | mixed the data to be matched by the filter. If no data is given then all filters will be matched. |
$dataIsInput | boolean true if the given data object is to be checked as input type, false to check against the output type. |
Definition at line 240 of file FilterDAO.inc.php.
References DAO\retrieve().
FilterDAO::insertObject | ( | $filter, | |
$contextId = CONTEXT_ID_NONE |
|||
) |
Insert a new filter instance (transformation).
$filter | PersistableFilter The configured filter instance to be persisted |
$contextId | integer |
Definition at line 117 of file FilterDAO.inc.php.
References _insertSubFilters(), getInsertId(), DAO\update(), and updateDataObjectSettings().
Referenced by _insertSubFilters(), and configureObject().
FilterDAO::updateDataObjectSettings | ( | $tableName, | |
$dataObject, | |||
$idArray | |||
) |
Reimplemented from DAO.
Definition at line 403 of file FilterDAO.inc.php.
Referenced by insertObject(), and updateObject().
FilterDAO::updateObject | ( | $filter | ) |
Update an existing filter instance (transformation).
$filter | PersistableFilter |
Definition at line 336 of file FilterDAO.inc.php.
References _deleteSubFiltersByParentFilterId(), _insertSubFilters(), DAO\update(), and updateDataObjectSettings().
array FilterDAO::$additionalFieldNames |
names of additional settings for the currently persisted/retrieved filter
Definition at line 49 of file FilterDAO.inc.php.
Referenced by getAdditionalFieldNames().
array FilterDAO::$localeFieldNames |
names of localized settings for the currently persisted/retrieved filter
Definition at line 55 of file FilterDAO.inc.php.
Referenced by getLocaleFieldNames().