Abstract implementation of SourceInterface containing basic utilities and logical separation between the Gems database and the Source database
package | Gems |
---|---|
subpackage | Tracker |
copyright | Copyright (c) 2011 Erasmus MC |
license | New BSD License |
since | Class available since version 1.2 |
__construct(array $sourceData, \Zend_Db_Adapter_Abstract $gemsDb)
inherited_from | \Gems_Tracker_Source_SourceInterface::__construct() |
---|
array
The information from gems__sources for this source.
\Zend_Db_Adapter_Abstract
Do not want to copy db using registry because that is public and this should be private
getId() : integer
inherited_from | \Gems_Tracker_Source_SourceInterface::getId() |
---|
integer
The source Id of this sourcegetRawTokenAnswerRowsCount(array $filter, integer $surveyId, string $sourceSurveyId = null
) : integer
Abstract implementation is not efficient, sources should handle this as efficient as possible.
inherited_from | \Gems_Tracker_Source_SourceInterface::getRawTokenAnswerRowsCount() |
---|
array
filter array
integer
Gems Survey Id
string
Optional Survey Id used by source
integer
getSourceDatabase() : \Zend_Db_Adapter_Abstract
inherited_from | \Gems_Tracker_Source_SourceInterface::getSourceDatabase() |
---|
\Zend_Db_Adapter_Abstract
synchronizeSurveyBatch(\Gems_Task_TaskRunnerBatch $batch, integer $userId) : array
inherited_from | \Gems_Tracker_Source_SourceInterface::synchronizeSurveyBatch() |
---|
\Gems_Task_TaskRunnerBatch
integer
Id of the user who takes the action (for logging)
array
Returns an array of messages_getGemsSurveysForSynchronisation() : array
array
Pairs gemsId => sourceId_getSourceSurveysForSynchronisation() : array
array
of sourceId values or false_getTokenFromSqlWhere(string $from, string $fieldName) : string
string
The tokens that should not occur
string
Name of database field to use
string
_getTokenFromToSql(string $from, string $to, string $fieldName) : string
string
The tokens that should not occur
string
The tokens that replace them
string
Name of database field to use
string
_updateGemsSurveyExists(array $surveyorSids, integer $userId) : array
array
The gsu_surveyor_id's that ARE in the source
integer
Id of the user who takes the action (for logging)
array
The names of the surveys that no longer exist_updateSource(array $values, integer $userId) : integer
array
The values that this source should be set to
integer
The current user
integer
1 if data changed, 0 otherwiseaddDatabasePrefix(\return $tableName, boolean $addDatabaseName = true
) : string
\return
boolean
Optional, when true (= default) and there is a database name then it is prepended to the name.
string
filterLimitOffset(array $filter, \Zend_Db_Select $select)
array
\Zend_Db_Select
getBaseUrl() : string
string
Base url for sourcegetSurveyData(integer $surveyId, string $field = null
) : array
Uses internal caching to prevent multiple db lookups during a program run (so no caching beyond page generation time)
integer
string
Optional field to retrieve data for
array
updateTokens(integer $userId, $updateTokens = true
) : integer
integer
Id of the user who takes the action (for logging)
integer
The number of tokens changed$project : \Gems_Project_ProjectSettings
$tracker : \Gems_Tracker
$_gemsDb : \Gems_Task_TaskRunnerBatch: \Zend_Db_Adapter_Abstract
$_sourceData : array
$_sourceDb : \Zend_Db_Adapter_Abstract