Person Class Reference

Inheritance diagram for Person:
BackboneModel

List of all members.

Public Member Functions

 Person ($data)
 toSimpleArray ()
 toSimpleJSON ()
 toArray ()
 create ()
 update ()
 delete ()
 exists ()
 getCacheId ()
 isAllowedToEdit ($person)
 isAllowedToEditDemographics ($person)
 getUser ()
 isLoggedIn ()
 getRegistration ()
 isMemberOf ($project)
 isMemberOfDuring ($project, $start, $end)
 getTimeOnProject ($project, $format="%d", $now="")
 isThemeLeader ()
 isThemeCoordinator ()
 isThemeLeaderDuring ($startRange, $endRange)
 isThemeCoordinatorDuring ($startRange, $endRange)
 isThemeLeaderOf ($project)
 isThemeCoordinatorOf ($project)
 getId ()
 getName ()
 getRealName ()
 getEmail ()
 getEmployeeId ()
 getPhoneNumber ()
 getGender ()
 getNationality ()
 getStakeholder ()
 isStakeholder ()
 getEarlyCareerResearcher ()
 getAgencies ($delim=null)
 getMitacs ()
 getCanadaResearchChair ()
 getTwitter ()
 getWebsite ()
 getLinkedIn ()
 getGoogleScholar ()
 getOrcid ()
 getScopus ()
 getResearcherId ()
 getOffice ()
 getUrl ()
 getPhoto ($cached=false)
 getNameForPost ()
 splitName ()
 getFirstName ()
 getMiddleName ()
 getLastName ()
 getPrevFirstName ()
 getPrevLastName ()
 getHonorific ()
 getCorrespondenceLanguage ()
 getLanguages ()
 getAddresses ()
 getTelephones ()
 getReversedName ()
 getNameForForms ($sep= ' ')
 getNameForProduct ($format=null)
 getAliases ()
 setAliases ($aliases)
 getProfile ($private=false)
 getMovedOn ()
 getAllMovedOn ()
 getThesis ($guess=true)
 getDegreeStartDate ($guess=true)
 getDegreeReceivedDate ($guess=true)
 getUniversity ()
 getUni ()
 getFaculty ()
 getDepartment ()
 getPosition ()
 getUniStart ()
 getUniEnd ()
 getPresentPosition ()
 getUniversityDuring ($startRange, $endRange)
 getCurrentUniversities ()
 getUniversitiesDuring ($startRange, $endRange)
 getPreviousUniversity ()
 getFirstUniversity ()
 getUniversities ()
 getKeywords ($delim=null)
 setKeywords ($keywords)
 getCRDC ($delim=null)
 setCRDC ($keywords)
 getGroups ()
 getRights ()
 getType ()
 getRoleString ()
 getRole ($role, $history=false)
 getRoles ($history=false)
 getRoleOn ($project, $year=null, $aliases=false)
 getAllowedRoles ()
 getAllowedProjects ()
 getFirstRole ()
 getLastRole ()
 wasLastRole ($role)
 wasLastRoleAtLeast ($role)
 wasLastRoleAtMost ($role)
 getRolesDuring ($startRange, $endRange)
 getRolesOn ($date)
 getSubRoles ()
 isSubRole ($subRole)
 isSubRoleBefore ($subRole, $date)
 isSubRoleSince ($subRole, $date)
 getPersonProjects ()
 getPersonThemes ()
 getPersonUniversities ()
 getProjects ($history=false, $allowProposed=false)
 getProjectsDuring ($start, $end, $allowProposed=false)
 getRelationsDuring ($type='all', $startRange, $endRange)
 getManagedPeople ()
 getRelations ($type='all', $history=false, $inverse=false)
 getSimilarPeople ()
 getContributions ()
 getContributionsDuring ($year)
 getMultimedia ()
 getRecordings ()
 isCandidate ()
 isActive ()
 isStudent ()
 isMe ()
 isBoardMod ()
 isRole ($role, $project=null)
 isRoleOn ($role, $date, $project=null)
 isRoleDuring ($role, $startRange, $endRange, $project=null)
 isRoleAtLeastDuring ($role, $startRange, $endRange)
 isRoleAtLeast ($role)
 isRoleAtMost ($role)
 isEpic ()
 isEpic2 ()
 getCreators ()
 getRequestedMembers ()
 getPeopleRelatedTo ($type)
 getHQP ($history=false)
 getHQPDuring ($startRange, $endRange)
 getSupervisors ($history=false)
 getSupervisorsDuring ($startRange, $endRange)
 isSupervisor ($history=false)
 relatedTo ($person, $relationship)
 getSupervisorDates ($supervisor)
 getDelegates ()
 isDelegateFor ($person)
 getPapers ($category="all", $history=false, $grand='grand', $onlyPublic=true, $access='Forum')
 getPapersAuthored ($category="all", $startRange=CYCLE_START, $endRange=CYCLE_START_ACTUAL, $includeHQP=false, $networkRelated=true)
 getTopProductsLastUpdated ()
 getTopProducts ()
 getBibliographies ()
 getCoAuthors ($category="all", $history=false, $grand='grand', $onlyPublic=true, $access='Forum')
 leadership ($history=false, $idsOnly=false, $type='')
 leadershipDuring ($startRange, $endRange)
 getLeadThemes ()
 getCoordThemes ()
 getThemeProjects ()
 getAllocatedAmount ($year, $project=null, $byProject=false)
 getCCV ()
 isEvaluator ($year=YEAR)
 getEvaluateSubs ($year=YEAR)
 getEvaluates ($type, $year=YEAR, $class="Person")
 isEvaluatorOf ($object, $type, $year=YEAR, $class="Person")
 getEvaluators ($year=YEAR, $type='Researcher', $projId=0)
 isAuthorOf ($paper)
 isReceiverOf ($contribution)
 getMetrics ()
 getBirthDate ()
 getPronouns ()
 getIndigenousStatus ()
 getDisabilityStatus ()
 getMinorityStatus ()
 getEthnicity ()

Static Public Member Functions

static newFromId ($id)
static newFromName ($name)
static newFromReversedName ($name)
static newFromEmail ($email)
static newFromUser ($user)
static newFromWgUser ()
static newFromNameLike ($name)
static newFromAlias ($alias)
static cleanName ($name)
static generateAliasCache ()
static generateNamesCache ()
static generateRolesCache ()
static generateLeaderCache ()
static generateThemeLeaderCache ()
static generateUniversityCache ()
static generateAuthorshipCache ()
static generateAllPeopleCache ()
static getAllUniversities ()
static getAllPositions ()
static getAllFaculties ()
static getAllDepartments ()
static getDefaultUniversity ()
static getDefaultPosition ()
static getByIds ($ids)
static getAllStaff ()
static getAllPeople ($filter=null, $idOnly=false)
static getAllPeopleDuring ($filter=null, $startRange, $endRange)
static getAllPeopleOn ($filter=null, $date)
static getAllCandidates ($filter=null)
static getAllCandidatesDuring ($filter=null, $startDate=false, $endDate=false)
static peopleWithRoleExists ($role)
static getAllMovedOnDuring ($startRange, $endRange)
static generateSubRolesCache ()
static getAllEvaluates ($type, $year=YEAR, $class="Person")

Public Attributes

 $user = null
 $name
 $employeeId
 $email
 $phone
 $nationality
 $stakeholder
 $earlyCareerResearcher
 $agencies
 $mitacs
 $canadaResearchChair
 $gender
 $pronouns
 $photo
 $twitter
 $website
 $linkedin
 $googleScholar
 $orcid
 $scopus
 $researcherId
 $office
 $publicProfile
 $privateProfile
 $realname
 $firstName
 $lastName
 $middleName
 $prevFirstName
 $prevLastName
 $honorific
 $language
 $birthDate
 $indigenousStatus
 $minorityStatus
 $disabilityStatus
 $ethnicity
 $projects
 $university
 $universityDuring
 $groups
 $roles
 $rolesDuring
 $candidate
 $isEvaluator = array()
 $hqps
 $historyHqps
 $contributions
 $multimedia
 $aliases = false
 $roleHistory
 $degreeReceived
 $degreeStartDate
 $movedOn
 $thesis
 $leadershipCache = array()
 $themesCache = array()
 $hqpCache = array()
 $projectCache = array()
 $evaluateCache = array()

Static Public Attributes

static $cache = array()
static $rolesCache = array()
static $subRolesCache = array()
static $universityCache = array()
static $leaderCache = array()
static $themeLeaderCache = array()
static $aliasCache = array()
static $authorshipCache = array()
static $namesCache = array()
static $idsCache = array()
static $allPeopleCache = array()
static $facultyMap = array()

Member Function Documentation

static Person::cleanName ( name  )  [static]

Removes certain characters from a person's name to help matching

Parameters:
string $name The name to clean
Returns:
string The cleaned up name
Person::create (  ) 

Creates a new record in the DB for this BackboneModel

Returns:
boolean Returns whether or not the creation was successful or not

Reimplemented from BackboneModel.

Person::delete (  ) 

Deletes the record in the DB for this BackboneModel

Returns:
boolean Returns whether or not the deletion was successful or not

Reimplemented from BackboneModel.

Person::exists (  ) 

Returns whether or not this BackboneModel exists or not

Returns:
boolean Returns whether or not this BackboneModel exists or not

Reimplemented from BackboneModel.

static Person::generateAliasCache (  )  [static]

Caches the resultset of the alis table for superfast access

static Person::generateAllPeopleCache (  )  [static]

Caches the partial resultset of the mw_user table

static Person::generateAuthorshipCache (  )  [static]

Caches the resultset of the product authors

static Person::generateLeaderCache (  )  [static]

Caches the resultset of the leaders

static Person::generateNamesCache (  )  [static]

Caches the resultset of the user table for superfast access

static Person::generateRolesCache (  )  [static]

Caches the resultset of the user roles table NOTE: This only caches the current roles, not the history

static Person::generateThemeLeaderCache (  )  [static]

Caches the resultset of the theme leaders

static Person::generateUniversityCache (  )  [static]

Caches the resultset of the user universities

Person::getAddresses (  ) 

Returns an array of Address objects that this Person is from

Returns:
array The Address objects that this Person is from
Person::getAgencies ( delim = null  ) 

Returns the agencieis array for this Person

Returns:
string The agencies array for this Person
Person::getAliases (  ) 

Returns an array of aliases for this Person

Returns:
array This Person's aliases
static Person::getAllCandidates ( filter = null  )  [static]

Returns an array of People of the type $filter and are also candidates

Parameters:
string $filter The role to filter by
Returns:
array The array of People of the type $filter
static Person::getAllCandidatesDuring ( filter = null,
startDate = false,
endDate = false 
) [static]

Returns an array of People of the type $filter and are also candidates

Parameters:
string $filter The role to filter by
Returns:
array The array of People of the type $filter
static Person::getAllDepartments (  )  [static]

Returns an array of all Department names

Returns:
array An array of all Department names
static Person::getAllEvaluates ( type,
year = YEAR,
class = "Person" 
) [static]

Returns all of the evaluation assignments

Parameters:
string $type The type of assignment
string $year The year for the assignments
Returns:
array The evaluation assignments
static Person::getAllFaculties (  )  [static]

Returns an array of all Faculty names

Returns:
array An array of all Faculty names
Person::getAllMovedOn (  ) 

Returns all of the moved on rows for when this HQP was inactivated

Returns:
array An array of moved on rows
static Person::getAllMovedOnDuring ( startRange,
endRange 
) [static]

Returns the people who moved on between the given dates

Parameters:
string $startRange The start date
string $endRange The end date
Returns:
array An array of People
Person::getAllocatedAmount ( year,
project = null,
byProject = false 
)

Returns the allocated amount that this Person received for the specified $year and $project If no Project is specified, then the total amount for that year is returned. If the data is not in the DB Then it falls back to checking the uploaded revised budgets

Parameters:
int $year The allocation year
Project $project Which project this person received funding for
boolean $byProject Whether or not to return an array index by project with each allocation amount
Returns:
int The amount of allocation
static Person::getAllPeople ( filter = null,
idOnly = false 
) [static]

Returns an array of People of the type $filter

Parameters:
string $filter The role to filter by
boolean $idOnly Whether or not to only include the id, rather than instantiating a Person object (may result in slightly different results!)
Returns:
array The array of People of the type $filter
static Person::getAllPeopleDuring ( filter = null,
startRange,
endRange 
) [static]

Returns an array of People of the type $filter between $startRange and $endRange

Parameters:
string $filter The role to filter by
string $startRange The start date of the role
string $endRange The end date of the role
Returns:
array The array of People of the type $filter between $startRange and $endRange
static Person::getAllPeopleOn ( filter = null,
date 
) [static]

Returns an array of People of the type $filter

Parameters:
string $filter The role to get ('all' if including everyone, even if on no project)
string $date The date that the person was on the role $filter
Returns:
array An array of People of the type $filter
static Person::getAllPositions (  )  [static]

Returns an array of all Position names

Returns:
array An array of all Position names
static Person::getAllStaff (  )  [static]

Returns all the People who currently have at least the Staff role

Returns:
array The People who currently have at least the Staff role
static Person::getAllUniversities (  )  [static]

Returns an array of all University names

Returns:
array An array of all University names
Person::getBibliographies (  ) 

Returns an array of this Person's Bibliographies

Returns:
array The array of this Person's Bibliographies
Person::getBirthDate (  ) 

Returns the birth date of this Person

Returns:
string The birth date of this Person
static Person::getByIds ( ids  )  [static]

Returns all the People with the given ids

Parameters:
array $ids The array of ids
Returns:
array The array of People
Person::getCacheId (  ) 

Returns the id of this BackboneModel's cache

Returns:
string Returns the id of this BackboneModel's cache

Reimplemented from BackboneModel.

Person::getCanadaResearchChair (  ) 

Returns the canada research chair status of this Person

Returns:
string The canada research chair status of this Person
Person::getCCV (  ) 

Returns the CCV XML that belongs to this Person

Returns:
string The CCV XML that belongs to this Person
Person::getCoAuthors ( category = "all",
history = false,
grand = 'grand',
onlyPublic = true,
access = 'Forum' 
)

Returns an array of People who are authors of Products writted by this Person or their HQP

Parameters:
string $category The category of Papers to get
boolean $history Whether or not to include past publications (ie. written by past HQP)
string $grand Whether to include 'grand' 'nonGrand' or 'both' Papers
boolean $onlyPublic Whether or not to only include Papers with access_id = 0
string $access Whether to include 'Forum' or 'Public' access
Returns:
array Returns an array of People who are authors of Products writted by this Person or their HQP
Person::getContributions (  ) 

Returns this Person's Contributions

Returns:
array This Person's Contributions
Person::getContributionsDuring ( year  ) 

Returns the Contributions this Person has made during the given year

Parameters:
string $year The year of the Contribution
Returns:
array The Contribution this Person has made
Person::getCoordThemes (  ) 

Returns the Themes that this Person is a coordinator of

Returns:
array The Themes that this Person is a coordinator of
Person::getCorrespondenceLanguage (  ) 

Returns the correspondence language of this Person (either 'French' or 'English')

Returns:
String The correspondence language of this Person (either 'French' or 'English')
Person::getCRDC ( delim = null  ) 

Returns all the crdc codes for this Person

Parameters:
string $delim An optional delimiter
Returns:
array All the crdc codes for this Person as an array, or a string if a delimiter is specified
Person::getCreators (  ) 

Returns the People who requested this Person, or an empty array if no one Requested

Returns:
array The People who requested this Person
static Person::getDefaultPosition (  )  [static]

Returns the default Position name

Returns:
string The default Position name
static Person::getDefaultUniversity (  )  [static]

Returns the default University name

Returns:
string The default University name
Person::getDegreeReceivedDate ( guess = true  ) 

Returns when this Person's degree ended (NOTE: This is a guesstimate)

Returns:
string The date that this Person's degree ended
Person::getDegreeStartDate ( guess = true  ) 

Returns when this Person's degree started (NOTE: This is a guesstimate)

Returns:
string The date that this Person's degree started
Person::getDelegates (  ) 

Returns and array of Person objects who this Person can delegate

Returns:
array The list of People who this Person can delegate
Person::getDepartment (  ) 

Returns the name of the Department that this Person is at

Returns:
string The name of the Department
Person::getDisabilityStatus (  ) 

Returns the if this Person has a disability

Returns:
string The disability status of this Person
Person::getEarlyCareerResearcher (  ) 

Returns the earlyCareerResearcher status of this Person

Returns:
string The earlyCareerResearcher status of this Person
Person::getEmail (  ) 

Returns the email address of this Person

Returns:
string The email address of this Person
Person::getEmployeeId (  ) 

Returns the email address of this Person

Returns:
string The email address of this Person
Person::getEthnicity (  ) 

Returns This Person's ethnicity

Returns:
string This Person's ethnicity
Person::getEvaluates ( type,
year = YEAR,
class = "Person" 
)

Returns all of the evaluation assignments for this Person

Parameters:
string $type The type of assignment
string $year The year for the assignments
string $class The class of the evaluatee
Returns:
array The evaluation assignments for this Person
Person::getEvaluateSubs ( year = YEAR  ) 

Returns the list of evaluation assignments for this Person

Parameters:
string $year The year for the assignments
Returns:
array The evaluation assignments for this Person
Person::getEvaluators ( year = YEAR,
type = 'Researcher',
projId = 0 
)

Returns a list of the evaluators who are evaluating this Person

Parameters:
string $year The year of the evaluation
string $type The type of evaluation
string $projId The id of the project (optional)
Returns:
array The list of People who are evaluating this Person
Person::getFaculty (  ) 

Tries to map the department to a faculty

Returns:
string The name of the faculty
Person::getFirstName (  ) 

Returns the first name of this Person If the first name was explicitly set then use that, otherwise it will parse it from the username

Returns:
String The first name of this Person
Person::getFirstRole (  ) 

Returns the first role that this Person had

Returns:
Role The first role that this Person had, null if this Person has never had any Roles
Person::getGender (  ) 

Returns the gender of this Person

Returns:
string The gender of this Person
Person::getGoogleScholar (  ) 

Returns the url of this Person's google scholar

Returns:
string The url of this Person's google scholar
Person::getGroups (  ) 

Returns an array of groups that this Person is in

Returns:
array The groups that this Person is in
Person::getHonorific (  ) 

Returns the honorific (Dr. Mrs. etc) of this Person

Returns:
String The honorific (Dr. Mrs. etc) of this Person
Person::getHQP ( history = false  ) 

Returns this Person's HQP

Parameters:
mixed $history Whether or not to include all HQP in history (can also be a specific date)
Returns:
array This Person's HQP
Person::getHQPDuring ( startRange,
endRange 
)

Returns this Person's HQP during the given dates

Parameters:
string $startRange The start date
string $endRange The end date
Returns:
array This Person's HQP
Person::getId (  ) 

Returns the id of this Person. Returns 0 if the user doesn't exist or if is an HQP and the current user is not logged in

Returns:
int The id of this Person

Reimplemented from BackboneModel.

Person::getIndigenousStatus (  ) 

Returns whether the Person identifies as indigenous

Returns:
string The indigenous status of this person
Person::getKeywords ( delim = null  ) 

Returns all the keywords for this Person

Parameters:
string $delim An optional delimiter
Returns:
array All the keywords for this Person as an array, or a string if a delimiter is specified
Person::getLanguages (  ) 

Returns an array of UserLanguage objects that this Person knows

Returns:
array The UserLanguages that this Person knows
Person::getLastName (  ) 

Returns the last name of this Person If the last name was explicitly set then use that, otherwise it will parse it from the username

Returns:
String The last name of this Person
Person::getLastRole (  ) 

Returns the last role that this Person had

Returns:
Role The last role that this Person had, null if this Person has never had any Roles
Person::getLeadThemes (  ) 

Returns the Themes that this Person is a leader of

Returns:
array The Themes that this Person is a leader of
Person::getLinkedIn (  ) 

Returns the url of this Person's website

Returns:
string The url of this Person's website
Person::getMiddleName (  ) 

Returns the middle name of this Person

Returns:
String The middle name of this Person
Person::getMinorityStatus (  ) 

Returns the if this Person is a visible minority

Returns:
string The minority status of this Person
Person::getMitacs (  ) 

Returns the MITACS status of this Person

Returns:
string The MITACS status of this Person
Person::getMovedOn (  ) 

Returns the moved on row for when this HQP was inactivated

Returns:
array An array of key/value pairs representing the DB row
Person::getMultimedia (  ) 

Returns the Multimedia this Person has made

Returns:
array the Multimedia this Person has made
Person::getName (  ) 

Returns the user name of this Person

Returns:
string The user name of this Person
Person::getNameForForms ( sep = ' '  ) 

Returns a name usable in forms ("First Last" usually)

Returns:
string A name usable in forms
Person::getNameForPost (  ) 

Returns the name of this Person with dots replaced by spaces

Returns:
string The name of this Person with dots replaced by spaces
Person::getNationality (  ) 

Returns the nationality of this Person

Returns:
string The nationality of this Person
Person::getPapers ( category = "all",
history = false,
grand = 'grand',
onlyPublic = true,
access = 'Forum' 
)

Returns an array of Paper(s) authored or co-authored by this Person _or_ their HQP

Parameters:
string $category The category of Paper to get
boolean $history Whether or not to include past publications (ie. written by past HQP)
string $grand Whether to include 'grand' 'nonGrand' or 'both' Papers
boolean $onlyPublic Whether or not to only include Papers with access_id = 0
string $access Whether to include 'Forum' or 'Public' access
Returns:
array Returns an array of Paper(s) authored or co-authored by this Person _or_ their HQP
Person::getPapersAuthored ( category = "all",
startRange = CYCLE_START,
endRange = CYCLE_START_ACTUAL,
includeHQP = false,
networkRelated = true 
)

Returns an array of Paper(s) authored/co-authored by this Person during the specified dates

Parameters:
string $category The category of Paper to get
string $startRange The starting date (start of the current reporting year if not specified)
string $endRange The end date (end of the current reporting year if not specified)
boolean $includeHQP Whether or not to include HQP in the result
boolean $networkRelated Whether or not the products need to be associated with a project
Returns:
array Returns an array of Paper(s) authored/co-authored by this Person during the specified dates
Person::getPhoneNumber (  ) 

Returns the phone number of this Person

Returns:
string The phone number of this Person
Person::getPhoto ( cached = false  ) 

Returns the path to a photo of this Person if it exists

Parameters:
boolen $cached Whether or not to use a cached version
Returns:
string The path to a photo of this Person
Person::getPosition (  ) 

Returns the name of the Position/Title that this Person is

Returns:
string The name of the Postion/Title
Person::getPresentPosition (  ) 

Used by CCVExport to determine the current position of active/inactive HQP

Person::getPrevFirstName (  ) 

Returns the previous first name of this Person

Returns:
String The previous first name of this Person
Person::getPrevLastName (  ) 

Returns the previous last name of this Person

Returns:
String The previous last name of this Person
Person::getProfile ( private = false  ) 

Returns the text from this Person's profile

Parameters:
boolean $private If tru, then it grabs the private version, otherwise it gets the public
Returns:
string This Person's profile text
Person::getProjects ( history = false,
allowProposed = false 
)

Returns an array of Projects that this Person is a part of

Parameters:
boolean $history Whether or not to include the full history
boolean $allowProposed Whether or not to include proposed projects
Returns:
array The Projects that this Person is a part of
Person::getProjectsDuring ( start,
end,
allowProposed = false 
)

Returns an array of Projects that this Person is a part of between the given dates

Parameters:
string $start The start date
string $end The end date
boolean $allowProposed Whether or not to include proposed Projects
Returns:
array The Projects that this Person is a part of
Person::getPronouns (  ) 

Returns This Person's pronouns

Returns:
string This Person's pronouns
Person::getRealName (  ) 

Returns the real name of this Person

Returns:
string The real name of this Person
Person::getRecordings (  ) 

Returns an array of objects representing this user's recordings

Returns:
array An array of objects representing this user's recordings
Person::getRegistration (  ) 

Returns when the User registered

Returns:
string The string representing the date that this user Registered
Person::getRelations ( type = 'all',
history = false,
inverse = false 
)

Returns the Relationships this Person has

Parameters:
string $type The type of Relationship
boolean $history Whether or not to include the full history of Relationships
boolean $inverse Changes which user 'this Person' is referring to (user1/user2). This only works when logged in at least Staff
Returns:
array The Relationships this Person has
Person::getRelationsDuring ( type = 'all',
startRange,
endRange 
)

Returns the Relationships this Person has between the given dates

Parameters:
string $type The type of Relationship
string $startRange The start date
string $endRange The end date
Returns:
array The Relationships this Person has
Person::getRequestedMembers (  ) 

Returns the People that this Person has requested to be created

Returns:
array The People that this Person has requested to be created
Person::getReversedName (  ) 

Returns a this Person's name in the form "Last, First"

Returns:
string This Person's name in the form "Last, First"
Person::getRights (  ) 

Returns an array of rights that this Person has

Returns:
array The rights that this Person has
Person::getRole ( role,
history = false 
)

Returns the Role object that matches the name of the role

Parameters:
string $role The name of the role
Returns:
Role The role of this Person
Person::getRoleOn ( project,
year = null,
aliases = false 
)

Returns the role that this Person is on the given Project

Parameters:
Project $project The Project to check the roles of
integer $year The year to check
boolean $aliases Whether or not to include alias roles in the return
Returns:
string The name of the role
Person::getRoles ( history = false  ) 

Returns all of this Person's Roles

Parameters:
boolean $history Whether or not to include all the history of roles
array The Roles this Person has
Person::getRolesDuring ( startRange,
endRange 
)

Returns the Roles this Person had between the given dates

Parameters:
string $startRange The start date
string $endRange The end date
Returns:
array The Roles this Person had between the given dates
Person::getRolesOn ( date  ) 

Returns the Roles this Person had on the given date

Parameters:
string $date The date to check
Returns:
array The Roles this Person had on the given date
Person::getRoleString (  ) 

Returns a string containing the full role information

Returns:
string The full role information for this Person
Person::getSimilarPeople (  ) 

Returns an array of People who are 'similar' to this one

Returns:
array People who are 'similar' to this one
Person::getStakeholder (  ) 

Returns the stakeholder category of this Person

Returns:
string The stakeholder category of this Person
Person::getSubRoles (  ) 

Returns an array of the subRoles that this Person is in

Returns:
array The subRoles that this Person is in
Person::getSupervisorDates ( supervisor  ) 

Returns an array of start/end dates for when the given supervisor supervised this Person

Parameters:
Person $supervisor The Person that supervised this Person
Returns:
array The start/end dates of the relation(s)
Person::getSupervisors ( history = false  ) 

Returns this Person's Supervisors

Parameters:
mixed $history Whether or not to include all Supervisors in history (can also be a specific date)
Returns:
array This Person's Supervisors
Person::getSupervisorsDuring ( startRange,
endRange 
)

Returns this Person's Supervisors between the given dates

Parameters:
string $startRange The start date
string $endRange The end date
Returns:
array This Person's Supervisors
Person::getTelephones (  ) 

Returns an array of Telephone objects that this Person has

Returns:
array The Telephone objects that this Person has
Person::getThemeProjects (  ) 

Returns an array of Projects that this Person is a Theme Leader of

Returns:
array The Projects that this Person is a Theme Leader of
Person::getThesis ( guess = true  ) 

Returns the reported thesis for when HQPs are inactivated

Parameters:
boolean $guess Whether or not to take a guess at what the thesis is
Returns:
Product The Product object representing the thesis
Person::getTimeOnProject ( project,
format = "%d",
now = "" 
)

Returns the amount of time that this Person has been on the specified project

Parameters:
Project $project The Project that the Person has been on
string $format The format for the time (Defaults to number of days)
string $now What time to compare the join date to (Defaults to now)
Returns:
string The time spent on the specified project
Person::getTopProducts (  ) 

Returns the list of this Person's top products

Returns:
array This Person's top products
Person::getTopProductsLastUpdated (  ) 

Returns when this Person's top products were last updated

Returns:
string When this Person's to products were last updated
Person::getTwitter (  ) 

Returns the handle of this Person's twitter account

Returns:
string The handle of this Person's twitter account
Person::getType (  ) 

Returns one of the roles that this person is

Returns:
string One of the roles that this person is
Person::getUni (  ) 

Returns the name of the University that this Person is at

Returns:
string The name of the University
Person::getUniversities (  ) 

Returns all the Universities that this Person has been a part of

Returns:
array All the Universities that this Person has been a part of
Person::getUniversitiesDuring ( startRange,
endRange 
)

Returns all the Universities that this Person was at between the given range

Parameters:
string $startRange The start date to look at
string $endRange The end date to look at
Returns:
array The Universities that this Person was at between the given range
Person::getUniversity (  ) 

Returns the current University that this Person is at

Returns:
array The current University this Person is at
Person::getUniversityDuring ( startRange,
endRange 
)

Returns the last University that this Person was at between the given range

Parameters:
string $startRange The start date to look at
string $endRange The end date to look at
Returns:
array The last University that this Person was at between the given range
Person::getUrl (  ) 

Returns the url of this Person's profile page

Returns:
string The url of this Person's profile page
Person::getUser (  ) 

Returns the Mediawiki User object for this Person

Returns:
User The Mediawiki User object for this Person
Person::getWebsite (  ) 

Returns the url of this Person's website

Returns:
string The url of this Person's website
Person::isAllowedToEdit ( person  ) 

Returns whether or not this Person is allowed to edit the specified Person

Parameters:
Person $person The Person to edit
Returns:
Person Whether or not this Person is allowed to edit the specified Person
Person::isAllowedToEditDemographics ( person  ) 

Returns whether or not this Person is allowed to edit the specified Person's demographics

Parameters:
Person $person The Person to edit
Returns:
Person Whether or not this Person is allowed to edit the specified Person
Person::isAuthorOf ( paper  ) 

Returns whether or not this Person is the author of the given Product

Parameters:
Product $paper The Product to see if this Person is on
Returns:
boolean Whether or not this Person is the author of the given Product
Person::isBoardMod (  ) 

Returns whether this Person is a Message Board Moderator

Returns:
boolean Whether this Person is a Message Board Moderator
Person::isDelegateFor ( person  ) 

Returns whether or not this Person is a delegate for the given Person

Parameters:
Person 
Returns:
boolean Whether or not this Person is a delegate for the given Person
Person::isEpic (  ) 

Returns whether or not this Person is an EPIC HQP (for AGE-WELL)

Returns:
boolean Whether or not this Person is an EPIC HQP
Person::isEvaluator ( year = YEAR  ) 

Returns whether or not this Person is an evaluator on the given Year

Parameters:
string $year The year this Person was an evaluator
Returns:
boolean Whether or not this Person is an evaluator
Person::isLoggedIn (  ) 

Returns whether or not this Person is logged in or not

Returns:
boolean Whether or not this Person is logged in or not
Person::isMe (  ) 

Returns whether this Person is the same as $wgUser

Returns:
boolean Whether this Person is the same as $wgUser
Person::isMemberOf ( project  ) 

Returns whether this Person is a member of the given Project or not

Parameters:
Project $project The Project to check
Returns:
boolean Whether or not this Person is currently a member of the given Project
Person::isMemberOfDuring ( project,
start,
end 
)

Returns whether this Person is a member of the given Project during the given dates

Parameters:
Project $project The Project to check
string $start The start date
string $end The end date
Returns:
boolean Whether or not this Person is a member of the given Project
Person::isReceiverOf ( contribution  ) 

Returns whether or not this Person received the given Contribution

Parameters:
Contribution $contribution The Contribution
Returns:
boolean Whether or not this Person received the given Contribution
Person::isRole ( role,
project = null 
)

Returns whether this Person is the given role (on the given optional project)

Parameters:
string $role The role of this Person
Project $project The Project the Person is a role on
Returns:
boolean Whether or not the Person is the given role
Person::isRoleAtLeast ( role  ) 

Returns whether this Person is at least the given role

Parameters:
string $role The role of this Person
Returns:
boolean Whether or not the Person is the given role
Person::isRoleAtLeastDuring ( role,
startRange,
endRange 
)

Returns whether this Person was at least the given role between the given dates

Parameters:
string $role The role of this Person
string $startRange The start date
string $endRange The end date
Returns:
boolean Whether or not the Person is the given role
Person::isRoleAtMost ( role  ) 

Returns whether this Person is at most the given role

Parameters:
string $role The role of this Person
Returns:
boolean Whether or not the Person is the given role
Person::isRoleDuring ( role,
startRange,
endRange,
project = null 
)

Returns whether this Person is the given role between the given dates (on the given optional project)

Parameters:
string $role The role of this Person
string $startRange The start date
string $endRange The end date
Project $project The Project the Person is a role on
Returns:
boolean Whether or not the Person is the given role
Person::isRoleOn ( role,
date,
project = null 
)

Returns whether this Person is the given role on the given date (on the given optional project)

Parameters:
string $role The role of this Person
string $data The date of the role
Project $project The Project the Person is a role on
Returns:
boolean Whether or not the Person is the given role
Person::isStakeholder (  ) 

Returns whether this Person is a stakeholder

Returns:
string Whether this Person is a stakeholder
Person::isStudent (  ) 

Returns whether or not this person is a Student

Returns:
boolean Whether or not his person is a Student
Person::isSubRole ( subRole  ) 

Returns whether or not this Person is in the subRole or not

Parameters:
string $subRole The subrole to check
Returns:
boolean Whether or not this Person is in the subRole or not
Person::isSupervisor ( history = false  ) 

Returns whether this Person is a supervisor

Parameters:
mixed $history Whether or not to include the full history (can also be a specific date)
Returns:
boolean Whether this Person is a supervisor
Person::isThemeCoordinator (  ) 

Returns whether or not this Person is a theme coodinator

Returns:
boolean Whether or not this Person is a theme coodinator
Person::isThemeCoordinatorOf ( project  ) 

Returns whether or not this Person is a theme coodinator of the given Project

Parameters:
Project $project The Project to check
Returns:
boolean Whether or not this Person is a theme coordinator of the given Project
Person::isThemeLeader (  ) 

Returns whether or not this Person is theme leader

Returns:
boolean Whether or not this Person is a theme leader
Person::isThemeLeaderOf ( project  ) 

Returns whether or not this Person is a theme leader of the given Project

Parameters:
Project $project The Project to check
Returns:
boolean Whether or not this Person is a theme leader of the given Project
Person::leadership ( history = false,
idsOnly = false,
type = '' 
)

Returns an array of Projects that this Person is a leader or co-leader of

Parameters:
boolean $history Whether or not to include the entire leadership history
boolean $idsOnly Whether or not to just return the ids of the Projects
string $type The type of Project (ie. 'Administrative', 'Research')
Returns:
array The array of Projects
Person::leadershipDuring ( startRange,
endRange 
)

Returns an array of Projects that this Person is a leader of between the given dates

Parameters:
string $startRange The start date
string $endRange The end date
Returns:
The Projects that this Person is a leader of
static Person::newFromAlias ( alias  )  [static]

Returns a new Person from the given alias, if found the respective user ID is valid (ie, non-zero). NOTE: if the alias is not unique, an exception is thrown

Parameters:
string $alias The alias of the Person
Returns:
Person the Person from the given alias
static Person::newFromEmail ( email  )  [static]

Returns a new Person from the given email (null if not found) In the event of a collision, the first user is returned

Parameters:
string $email The email address of the Person
Returns:
Person The Person from the given email
static Person::newFromId ( id  )  [static]

Returns a new Person from the given id

Parameters:
int $id The id of the person
Returns:
Person The Person from the given id
static Person::newFromName ( name  )  [static]

Returns a new Person from the given name

Parameters:
string $name The name of the person
Returns:
Person The Person from the given name
static Person::newFromNameLike ( name  )  [static]

Returns a new Person who's name is similar to $name Similarity is based on re-arranging the name where there are spaces, or dots etc. Abbreviated names will also attempt to be matched

Parameters:
string $name The name of the Person
Returns:
Person the Person that matches the name
static Person::newFromReversedName ( name  )  [static]

Returns a new Person from the given reversed name

Parameters:
string $name The reversed name of the person
Returns:
Person The Person from the given reversed name
static Person::newFromUser ( user  )  [static]

Returns a new Person from the given Mediawiki User

Parameters:
User $user The Mediawiki User
Returns:
Person The Person from the given Mediawiki User
static Person::newFromWgUser (  )  [static]

Returns a new Person from the current logged in user ($wgUser)

Returns:
Person The Person who is currently logged in
static Person::peopleWithRoleExists ( role  )  [static]

Returns whether atleast one user with the role exists

Parameters:
string $role The role to check
Person::relatedTo ( person,
relationship 
)

Returns whether or not this person is related to another Person through a given relationship

Parameters:
Person $person The Person that this Person is related to
string $relationship The type of Relationship
Returns:
boolean Whether or not this Person is related to another Person
Person::setAliases ( aliases  ) 

Updates the Person's aliases

Parameters:
array $aliases The array of aliases
Returns:
array This Person's aliases
Person::setCRDC ( keywords  ) 

Updates the keywords for this Person

Parameters:
array $keywords The array of keywords
Person::setKeywords ( keywords  ) 

Updates the keywords for this Person

Parameters:
array $keywords The array of keywords
Person::splitName (  ) 

Returns an array of the name in the form ["first", "last"]

Returns:
array An array containing the first and last names
Person::toArray (  ) 

Generates and returns an array version of this BackboneModel

Returns:
array Returns an array version of this BackboneModel

Reimplemented from BackboneModel.

Person::update (  ) 

Updates the record in the DB for this BackboneModel

Returns:
boolean Returns whether or not the update was successful or not

Reimplemented from BackboneModel.

Person::wasLastRole ( role  ) 

Checks whether this Person's last Role was the given role

Parameters:
string $role The name of the role
Returns:
boolean Whether this Person's last Role was the given role
Person::wasLastRoleAtLeast ( role  ) 

Checks whether this Person's last Role was at least the given role

Parameters:
string $role The name of the role
Returns:
boolean Whether this Person's last Role was at least the given role
Person::wasLastRoleAtMost ( role  ) 

Checks whether this Person's last Role was at most the given role

Parameters:
string $role The name of the role
Returns:
boolean Whether this Person's last Role was at most the given role

The documentation for this class was generated from the following file:

Generated on 9 Jan 2025 for The Forum by  doxygen 1.6.1