Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

GameHelper Class Reference

Public Member Functions

 setModalNotificationsEnabled ($value)
 setModalCollectionsEnabled ($value)
 setModalCoinsEnabled ($value)
 getModalNotificationsEnabled ()
 getModalCollectionsEnabled ()
 getModalCoinsEnabled ()
 init ()
 resetDeferredPointTypesAndValuesByUserIdToAdd ()
 getDeferredPointTypesAndValuesByUserIdToAdd ()
 isScoringModelsOnSaveMuted ()
 muteScoringModelsOnSave ()
 unmuteScoringModelsOnSave ()
 muteScoringModelsOnDelete ()
 unmuteScoringModelsOnDelete ()
 initCustom ()
 triggerSearchModelsEvent ($modelClassName)
 triggerMassEditEvent ($modelClassName)
 triggerMassDeleteEvent ($modelClassName)
 triggerImportEvent ($modelClassName)
 processDeferredPoints ()
 resolveLevelChange ()
 resolveNewCollectionItems ()
 resolveNewBadges ()

Static Public Member Functions

static addPointsByUserDeferred (User $user, $type, $value)

Data Fields

 $enabled = true

Protected Member Functions

 resolveLevelChangeByType ($levelType, GameLevel $currentGameLevel, $pointSumsIndexedByType)

Static Protected Member Functions

static resolveSummationValueByLevelTypeAndPointSums ($levelType, $pointSumsIndexedByType)
static processLevelChangeGameNotification ($nextLevelValue)

Protected Attributes

 $_modalNotificationsEnabled
 $_modalCollectionsEnabled
 $_modalCoinsEnabled
 $scoringModelsOnSaveIsMuted = false
 $scoringModelsOnDeleteIsMuted = false

Detailed Description

Helps with game logic exuected during a page request. As scores are added, the point information is tabulated in the GamePointManager so it can then update persistent storage in a single request at the end of the page request.

Definition at line 42 of file GameHelper.php.


Member Function Documentation

initCustom (  ) 

Override as needed to customize various aspects of gamification. A few examples of things you can do here: GeneralGameLevelRules::setLastLevel(100); GeneralGameLevelRules::setLevelPointMap($newLevelPointMap);

Definition at line 187 of file GameHelper.php.

triggerSearchModelsEvent ( modelClassName  ) 
Parameters:
string $modelClassName

Definition at line 194 of file GameHelper.php.

triggerMassEditEvent ( modelClassName  ) 
Parameters:
string $modelClassName

Definition at line 208 of file GameHelper.php.

triggerMassDeleteEvent ( modelClassName  ) 
Parameters:
string $modelClassName(mass delete)

Definition at line 222 of file GameHelper.php.

triggerImportEvent ( modelClassName  ) 
Parameters:
string $modelClassName

Definition at line 236 of file GameHelper.php.

static addPointsByUserDeferred ( User user,
type,
value 
) [static]

Given a user, point type, and value, store the information in the

See also:
$pointTypesAndValuesByUserIdToAdd data array to be processed later at the end of the page request by
processDeferredPoints
Parameters:
User $user
String $type
Integer $value

Definition at line 254 of file GameHelper.php.

processDeferredPoints (  ) 

Process any points that have been added to

See also:
$pointTypesAndValuesByUserIdToAdd throughout the page request.

Definition at line 274 of file GameHelper.php.

resolveLevelChange (  ) 

Called at the end of the page request. Processes anylevel changes for the current user.

Definition at line 304 of file GameHelper.php.

resolveLevelChangeByType ( levelType,
GameLevel currentGameLevel,
pointSumsIndexedByType 
) [protected]
Parameters:
string $levelType
GameLevel $currentGameLevel
array $pointSumsIndexedByType
Exceptions:
FailedToSaveModelException 

Definition at line 338 of file GameHelper.php.

static resolveSummationValueByLevelTypeAndPointSums ( levelType,
pointSumsIndexedByType 
) [static, protected]
Parameters:
string $levelType
array $pointSumsIndexedByType
Returns:
int|number

Definition at line 378 of file GameHelper.php.

static processLevelChangeGameNotification ( nextLevelValue  )  [static, protected]
Parameters:
int $nextLevelValue
Exceptions:
FailedToSaveModelException 

Definition at line 403 of file GameHelper.php.

resolveNewBadges (  ) 

Called at the end of the page request. Processes any new badges or badge grade changes for the current user.

Definition at line 427 of file GameHelper.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sun Mar 24 07:10:50 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8