Member
extends MEMBER
in package
Member
Table of Contents
Properties
- $constituency : mixed
- $entered_house : mixed
- $extra_info : mixed
- $family_name : mixed
- $given_name : mixed
- $house_disp : mixed
- $houses : mixed
- $left_house : mixed
- $lordofname : mixed
- $member_id : mixed
- $other_constituencies : mixed
- $other_parties : mixed
- $party : mixed
- $person_id : mixed
- $the_users_mp : mixed
- $title : mixed
- $valid : mixed
- $db : mixed
Methods
- __construct() : mixed
- cohortKey() : string
- Cohort Key
- cohortParty() : mixed
- cohortPartyComparisonDirection() : mixed
- constituency() : mixed
- constituency_to_person_id() : mixed
- current_member() : mixed
- current_member_anywhere() : mixed
- currentPartyComparison() : mixed
- entered_house() : mixed
- entered_house_text() : mixed
- entered_reason() : mixed
- entered_reason_text() : mixed
- extra_info() : mixed
- family_name() : mixed
- full_name() : mixed
- future_mps() : mixed
- getEnterLeaveStrings() : array<string|int, mixed>
- Get Entered/Left Strings
- getEntryDate() : mixed
- getEUStance() : mixed
- getLeftDate() : mixed
- getMostRecentMembership() : mixed
- getOtherConstituenciesString() : string|null
- Get Other Constituencies String
- getOtherPartiesString() : string|null
- Get Other Parties String
- getPartyPolicyDiffs() : mixed
- getRegionalList() : mixed
- getRepNameForHouse() : mixed
- given_name() : mixed
- house() : mixed
- house_text() : mixed
- houses() : mixed
- image() : string
- Image
- isDead() : bool
- Is Dead
- isNew() : mixed
- left_house() : mixed
- left_house_text() : mixed
- left_reason() : mixed
- left_reason_text() : mixed
- load_extra_info() : mixed
- member_id() : mixed
- member_id_to_person_id() : mixed
- name_to_person_id() : mixed
- offices() : array<string|int, mixed>
- Offices
- party() : mixed
- party_text() : mixed
- person_id() : mixed
- postcode_to_person_id() : mixed
- previous_mps() : mixed
- set_users_mp() : mixed
- the_users_mp() : mixed
- url() : mixed
- _previous_future_mps_query() : mixed
- calculatePolicyDiffScore() : mixed
- entered_house_line() : mixed
- getOfficeObject() : mixed
- houses_pretty() : mixed
- includeOffice() : mixed
- isHigherPriorityHouse() : mixed
- left_house_line() : mixed
- reasons() : mixed
Properties
$constituency
public
mixed
$constituency
$entered_house
public
mixed
$entered_house
= array()
$extra_info
public
mixed
$extra_info
= array()
$family_name
public
mixed
$family_name
$given_name
public
mixed
$given_name
$house_disp
public
mixed
$house_disp
= 0
$houses
public
mixed
$houses
= array()
$left_house
public
mixed
$left_house
= array()
$lordofname
public
mixed
$lordofname
$member_id
public
mixed
$member_id
$other_constituencies
public
mixed
$other_constituencies
$other_parties
public
mixed
$other_parties
= array()
$party
public
mixed
$party
$person_id
public
mixed
$person_id
$the_users_mp
public
mixed
$the_users_mp
= \false
$title
public
mixed
$title
$valid
public
mixed
$valid
= \false
$db
private
mixed
$db
Methods
__construct()
public
__construct(mixed $args) : mixed
Parameters
- $args : mixed
cohortKey()
Cohort Key
public
cohortKey([mixed $house = HOUSE_TYPE_COMMONS ]) : string
Gets a key that defines the periods and party a member should be compared against
Parameters
- $house : mixed = HOUSE_TYPE_COMMONS
Return values
string —of party and entry dates
cohortParty()
public
cohortParty([mixed $house = HOUSE_TYPE_COMMONS ]) : mixed
Parameters
- $house : mixed = HOUSE_TYPE_COMMONS
cohortPartyComparisonDirection()
public
cohortPartyComparisonDirection() : mixed
constituency()
public
constituency() : mixed
constituency_to_person_id()
public
constituency_to_person_id(mixed $constituency[, mixed $house = null ]) : mixed
Parameters
- $constituency : mixed
- $house : mixed = null
current_member()
public
current_member([mixed $house = 0 ]) : mixed
Parameters
- $house : mixed = 0
current_member_anywhere()
public
current_member_anywhere() : mixed
currentPartyComparison()
public
currentPartyComparison() : mixed
entered_house()
public
entered_house([mixed $house = null ]) : mixed
Parameters
- $house : mixed = null
entered_house_text()
public
entered_house_text(mixed $entered_house) : mixed
Parameters
- $entered_house : mixed
entered_reason()
public
entered_reason() : mixed
entered_reason_text()
public
entered_reason_text(mixed $entered_reason) : mixed
Parameters
- $entered_reason : mixed
extra_info()
public
extra_info() : mixed
family_name()
public
family_name() : mixed
full_name()
public
full_name([mixed $no_mp_title = false ]) : mixed
Parameters
- $no_mp_title : mixed = false
future_mps()
public
future_mps() : mixed
getEnterLeaveStrings()
Get Entered/Left Strings
public
getEnterLeaveStrings() : array<string|int, mixed>
Return an array of readable strings covering when people entered or left various houses. Returns an array since it's possible for a member to have done several of these things.
Return values
array<string|int, mixed> —An array of strings of when this member entered or left houses.
getEntryDate()
public
getEntryDate([mixed $house = HOUSE_TYPE_COMMONS ]) : mixed
Parameters
- $house : mixed = HOUSE_TYPE_COMMONS
getEUStance()
public
getEUStance() : mixed
getLeftDate()
public
getLeftDate([mixed $house = HOUSE_TYPE_COMMONS ]) : mixed
Parameters
- $house : mixed = HOUSE_TYPE_COMMONS
getMostRecentMembership()
public
getMostRecentMembership() : mixed
getOtherConstituenciesString()
Get Other Constituencies String
public
getOtherConstituenciesString() : string|null
Return a readable list of other constituencies for this member.
Return values
string|null —A readable list of the other constituencies for this member.
getOtherPartiesString()
Get Other Parties String
public
getOtherPartiesString() : string|null
Return a readable list of party changes for this member.
Return values
string|null —A readable list of the party changes for this member.
getPartyPolicyDiffs()
public
getPartyPolicyDiffs(mixed $partyCohort, mixed $policiesList, mixed $positions[, mixed $only_diffs = false ]) : mixed
Parameters
- $partyCohort : mixed
- $policiesList : mixed
- $positions : mixed
- $only_diffs : mixed = false
getRegionalList()
public
static getRegionalList(mixed $postcode, mixed $house, mixed $type) : mixed
Parameters
- $postcode : mixed
- $house : mixed
- $type : mixed
getRepNameForHouse()
public
static getRepNameForHouse(mixed $house) : mixed
Parameters
- $house : mixed
given_name()
public
given_name() : mixed
house()
public
house(mixed $house) : mixed
Parameters
- $house : mixed
house_text()
public
house_text(mixed $house) : mixed
Parameters
- $house : mixed
houses()
public
houses() : mixed
image()
Image
public
image() : string
Return a URL for the member's image.
Return values
string —The URL of the member's image.
isDead()
Is Dead
public
isDead() : bool
Determine if the member has died or not.
Return values
bool —If the member is dead or not.
isNew()
public
isNew([mixed $house = HOUSE_TYPE_COMMONS ]) : mixed
Parameters
- $house : mixed = HOUSE_TYPE_COMMONS
left_house()
public
left_house([mixed $house = null ]) : mixed
Parameters
- $house : mixed = null
left_house_text()
public
left_house_text(mixed $left_house) : mixed
Parameters
- $left_house : mixed
left_reason()
public
left_reason() : mixed
left_reason_text()
public
left_reason_text(mixed $left_reason, mixed $left_house, mixed $house) : mixed
Parameters
- $left_reason : mixed
- $left_house : mixed
- $house : mixed
load_extra_info()
public
load_extra_info([mixed $display = false ][, mixed $force = false ]) : mixed
Parameters
- $display : mixed = false
- $force : mixed = false
member_id()
public
member_id() : mixed
member_id_to_person_id()
public
member_id_to_person_id(mixed $member_id) : mixed
Parameters
- $member_id : mixed
name_to_person_id()
public
name_to_person_id(mixed $name[, mixed $const = '' ]) : mixed
Parameters
- $name : mixed
- $const : mixed = ''
offices()
Offices
public
offices([string $include_only = null ][, bool $ignore_committees = false ]) : array<string|int, mixed>
Return an array of Office objects held (or previously held) by the member.
Parameters
- $include_only : string = null
-
Restrict the list to include only "previous" or "current" offices.
- $ignore_committees : bool = false
-
Ignore offices that appear to be committee memberships.
Return values
array<string|int, mixed> —An array of Office objects.
party()
public
party() : mixed
party_text()
public
party_text([mixed $party = null ]) : mixed
Parameters
- $party : mixed = null
person_id()
public
person_id() : mixed
postcode_to_person_id()
public
postcode_to_person_id(mixed $postcode[, mixed $house = null ]) : mixed
Parameters
- $postcode : mixed
- $house : mixed = null
previous_mps()
public
previous_mps() : mixed
set_users_mp()
public
set_users_mp() : mixed
the_users_mp()
public
the_users_mp() : mixed
url()
public
url([mixed $absolute = false ]) : mixed
Parameters
- $absolute : mixed = false
_previous_future_mps_query()
private
_previous_future_mps_query(mixed $direction) : mixed
Parameters
- $direction : mixed
calculatePolicyDiffScore()
private
calculatePolicyDiffScore(mixed $mp_score, mixed $party_score) : mixed
Parameters
- $mp_score : mixed
- $party_score : mixed
entered_house_line()
private
entered_house_line(mixed $house, mixed $house_name) : mixed
Parameters
- $house : mixed
- $house_name : mixed
getOfficeObject()
private
getOfficeObject(mixed $include_only, mixed $ignore_committees, mixed $row) : mixed
Parameters
- $include_only : mixed
- $ignore_committees : mixed
- $row : mixed
houses_pretty()
private
houses_pretty() : mixed
includeOffice()
private
includeOffice(mixed $include_only, mixed $to_date) : mixed
Parameters
- $include_only : mixed
- $to_date : mixed
isHigherPriorityHouse()
private
isHigherPriorityHouse(int $house) : mixed
Parameters
- $house : int
left_house_line()
private
left_house_line(mixed $house, mixed $house_name) : mixed
Parameters
- $house : mixed
- $house_name : mixed
reasons()
private
reasons() : mixed