modules/Teams/TeamSetManager.php

Show: inherited
Table of Contents

Constants

Constant  TEAM_SET_CACHE_KEY = 'TeamSetsCache'
Constant  TEAM_SET_MD5_CACHE_KEY = 'TeamSetsMD5Cache'

\TeamSetManager

Package:

Properties

Propertyprivate  $_setHash= 'array()'
static
Default valuearray()Details
Type
n/a
Propertyprivate  $instance= ''
static
Details
Type
n/a

Methods

methodprivate__construct( ) : void

Constructor for TrackerManager. Declared private for singleton pattern.

methodpublicadd( \$team_set_id $team_set_id, \$module $table_name ) : void
static

Add a team_set_id and module combination to the hash for later flushing to the db.

Parameters
Name Type Description
$team_set_id \$team_set_id
  • GUID of the team_set_id
$table_name \$module
  • string
methodpublicaddTeamSetMD5(  $team_set_id,  $md5 ) : void
static

Parameters
Name Type Description
$team_set_id
$md5
methodpubliccleanUp( ) : void
static

Go through each of the team_sets_modules and find sets that are no longer in use

methodpublicflushBackendCache( ) : void
static

clear out the cache

methodpublicgetCommaDelimitedTeams( \id $team_set_id, \id $primary_team_id = '', boolean $for_display = false ) : string
static

Return a comma delimited list of teams for display purposes

Parameters
Name Type Description
$team_set_id \id
$primary_team_id \id
$for_display boolean
Returns
Type Description
string
methodpublicgetFormattedTeamNames(  $teams_arr = array() ) : void
static

Parameters
Name Type Description
$teams_arr
methodpublicgetInstance( ) : void
static

getInstance Singleton method to return static instance of TrackerManager

Details
Returns
static TrackerManager instance  
methodpublicgetTeamSetIdFromMD5( \unknown_type $md5 ) : \unknown
static

Check if we have an md5 relationship to a team set id

Parameters
Name Type Description
$md5 \unknown_type
Returns
Type Description
\unknown
methodpublicgetTeamsFromSet( \$team_set_id $team_set_id ) : array
static

Retrieve a list of team associated with a set for display purposes

Parameters
Name Type Description
$team_set_id \$team_set_id

string

Returns
Type Description
array of teams array('id', 'name');
methodpublicgetUnformattedTeamsFromSet( \$team_set_id $team_set_id ) : array
static

Retrieve a list of team associated with a set

Parameters
Name Type Description
$team_set_id \$team_set_id

string

Returns
Type Description
array of teams array('id', 'name');
methodpublicrebuildTeamSets( ) : \the
static

Rebuild the team_sets_teams relationship and remove any teams that have been deleted from the system from the team set Go through each team set and check if each team on the set is still in the teams table.

Returns
Type Description
\the team sets that have been affected as well as the team ids within those team sets
methodpublicremoveTeamFromSets( string $team_id ) : Array
static

Given a particular team id, remove the team from all team sets that it belongs to

Parameters
Name Type Description
$team_id string

The team's id to remove from the team sets

Returns
Type Description
Array of team_set ids that were affected
methodpublicsave( ) : void
static

Save the data in the hash to the database using TeamSetModule object

methodpublicsaveTeamSetModule( \guid $teamSetId, string $tableName ) : void
static

The above method "save" will flush the entire cache, saveTeamSetModule will just save one entry.

Parameters
Name Type Description
$teamSetId \guid

the GUID of the team set id we wish to save

$tableName string

the corresponding table name

Documentation was generated by DocBlox 0.18.1.