PolicyPositions
in package
Policy Positions
Provides a list of policy positions of a given Member, plus supplementary information such as additional links.
Table of Contents
Properties
- $moreLinksString : mixed
- 'More Links' String
- $positions : mixed
- Positions
- $positionsById : mixed
- $sinceString : mixed
- 'Since' String
- $member : mixed
- Member
- $policies : mixed
- Policies
- $summaries : mixed
- Summary of a person's votes by policy
Methods
- __construct() : mixed
- Constructor
- displayDreamComparison() : mixed
- displayDreamComparison
- generateMoreLinksString() : mixed
- generateSinceString() : mixed
- getMemberPolicyPositions() : mixed
- Person Voting Record
Properties
$moreLinksString
'More Links' String
public
mixed
$moreLinksString
$positions
Positions
public
mixed
$positions
= array()
Array of positions held by the member.
$positionsById
public
mixed
$positionsById
= array()
$sinceString
'Since' String
public
mixed
$sinceString
$member
Member
private
mixed
$member
$policies
Policies
private
mixed
$policies
$summaries
Summary of a person's votes by policy
private
mixed
$summaries
Methods
__construct()
Constructor
public
__construct(Policies $policies, Member $member[, mixed $options = array() ]) : mixed
Parameters
displayDreamComparison()
displayDreamComparison
private
displayDreamComparison(mixed $dreamid, mixed $policy_description, mixed $votes_summary) : mixed
Returns an array with keys "full_sentence", "score", "position", "has_strong".
The "full_sentence" element is a string, beginning with a lower case letter, suitable for either displaying after a person’s name, eg:
"Lord Lordson consistently voted against [some policy]"
or being passed into ucfirst() and displayed as a sentence on its own, where the person's name is implied by context, eg:
"Consistently voted against [some policy]"
Parameters
- $dreamid : mixed
- $policy_description : mixed
- $votes_summary : mixed
generateMoreLinksString()
private
generateMoreLinksString() : mixed
generateSinceString()
private
generateSinceString() : mixed
getMemberPolicyPositions()
Person Voting Record
private
getMemberPolicyPositions([int $limit = null ]) : mixed
Populates this object's policy positions array.
Parameters
- $limit : int = null
-
The number of results to limit the output to.