Class Team_DB

Description

Team Module Database API.

This class presents a OOP interface to the common queries needed by Team Module functionality.

Located in /include/classes/database/Team_DB.inc (line 19)

DB
   |
   --CIB_DB
      |
      --Team_DB
Method Summary
 Team_DB Team_DB (string $dbname, string $user, mixed $pass, string $password)
 array getActiveMembers (int $teamID)
 array getMemberInformation (int $teamID)
 array getMemberNames (int $teamID)
 array getPersonIdDetails (mixed $pId, int $pID)
 array getTeamDetails (mixed $teamid, int $teamID)
 array getTeams ()
 array getUpcomingComps (mixed $teamID, [mixed $timeOffset = '-1 day'])
Variables

Inherited Variables

Inherited from DB

DB::$db
DB::$dbname
DB::$lastOID
DB::$password
DB::$user
Methods
Constructor Team_DB (line 33)

Team_DB Constructor.

Simply call the parent constructor.

  • access: public
  • todo: Add a check after connecting to make sure its a central DB and not a per-comp DB
Team_DB Team_DB (string $dbname, string $user, mixed $pass, string $password)
  • string $dbname: what database do you want to connect to
  • string $user: as what user
  • string $password: which what password
getActiveMembers (line 45)

Return a list of members for a given team.

Retuns a list of all the peopleID's for all current team members of the team identified by $team.

  • return: array of int's (primary keys) in no paticular order
  • access: public
array getActiveMembers (int $teamID)
  • int $teamID: the primary key of the given team
getCompsOpenForRegistration (line 129)

Return a list of competition names that are open

  • return: array of array
    • "CompUnix" => link identifier
    • "CompName" => full textual name
  • access: public
  • todo: unify with call in parent
array getCompsOpenForRegistration ()
getMemberInformation (line 61)

Return details for all members for a given team.

Retuns a more complete set of information for all members of a given team, including name, status, email, username (if user), phoone, and address (if entered)

  • return: array of arrays (sorted by lastname, firstname)
  • access: public
array getMemberInformation (int $teamID)
  • int $teamID: the primary key of the given team
getMemberNames (line 103)

Return a list of member names for a given team.

Retuns a list of all the names of $team's members.

  • return: array of array in lastname, firstname order
    • "PeopleId" => $pid
    • "Name" => "First Last"
  • access: public
array getMemberNames (int $teamID)
  • int $teamID: the primary key of the given team
getPersonIdDetails (line 261)

Return full contact information for a person Coalesces all the contact information and team membership(s) a given person.

  • return: hashed array of details
  • access: public
array getPersonIdDetails (mixed $pId, int $pID)
  • int $pID: the person you need information on
getTeamDetails (line 213)

Return full contact information for a team.

Coalesces all the team/captain contact information for a given team.

  • return: hashed array of details
  • access: public
array getTeamDetails (mixed $teamid, int $teamID)
  • int $teamID: the team you need information on
getTeams (line 191)

Return a list of teams

  • return: array of arrays, keyed by TeamID
    • "Name" => Full team name
    • "Short" => Abbreviated Form
  • access: public
array getTeams ()

Redefinition of:
CIB_DB::getTeams()
List of all known teams
getUpcomingComps (line 154)

Return a list of competition names that are upcoming

Used for generating lists of comps that might have pending invoices

  • return: array of array
    • "CompUnix" => link identifier
    • "CompName" => full textual name
  • access: public
  • todo: unify with call in parent
array getUpcomingComps (mixed $teamID, [mixed $timeOffset = '-1 day'])

Inherited Methods

Inherited From CIB_DB

 CIB_DB::CIB_DB()
 CIB_DB::addPending()
 CIB_DB::availibleUserName()
 CIB_DB::denyPermissionToUser()
 CIB_DB::expandTeamNamesFromID()
 CIB_DB::getApprovedOutsideComps()
 CIB_DB::getCaptainsEmails()
 CIB_DB::getCibServers()
 CIB_DB::getClosedComps()
 CIB_DB::getCompAnnouncements()
 CIB_DB::getCompsByDate()
 CIB_DB::getCompStatusChoices()
 CIB_DB::getCompTypes()
 CIB_DB::getCompUnixNames()
 CIB_DB::getConfigComps()
 CIB_DB::getDocumentList()
 CIB_DB::getHostedComps()
 CIB_DB::getNonApprovedOutsideComps()
 CIB_DB::getPendingKey()
 CIB_DB::getPendingKeys()
 CIB_DB::getPendingPermissions()
 CIB_DB::getSiteAnnouncements()
 CIB_DB::getSyncRequests()
 CIB_DB::getTeamAdmin()
 CIB_DB::getTeamIDs()
 CIB_DB::getTeamMemberships()
 CIB_DB::getTeamRequests()
 CIB_DB::getTeams()
 CIB_DB::getUserPasswordByName()
 CIB_DB::getUserRoles()
 CIB_DB::grantPermissionToUser()

Inherited From DB

 DB::DB()
 DB::commit()
 DB::getDBName()
 DB::getDBpass()
 DB::getDBuser()
 DB::getLastOID()
 DB::helper_limitOffset()
 DB::helper_queryToArray()
 DB::helper_queryToArrayCategories()
 DB::helper_queryToSimpleArray()
 DB::helper_singleValueQuery()
 DB::query()
 DB::rollback()
 DB::startTransaction()

Documentation generated on Tue, 25 Apr 2006 13:11:44 -0400 by phpDocumentor 1.3.0RC3