Policies
in package
Policies
Class to provide management (selection, sorting etc) of PublicWhip policies.
Table of Contents
Properties
- $covid_affected : mixed
- $commons_only : mixed
- $db : mixed
- $policy_id : mixed
Methods
- __construct() : mixed
- getCovidAffected() : mixed
- getPolicies() : mixed
- getPoliciesData() : array<string|int, mixed>
- Get Array
- getPolicyDetails() : mixed
- getSetDescriptions() : mixed
- limitToArray() : mixed
- limitToSet() : self
- Limit To Set
- shuffle() : self
- Shuffle
Properties
$covid_affected
protected
mixed
$covid_affected
= [1136, 6860]
$commons_only
private
mixed
$commons_only
= array(811, 826, 1053)
$db
private
mixed
$db
$policy_id
private
mixed
$policy_id
Methods
__construct()
public
__construct([mixed $policy_id = null ]) : mixed
Parameters
- $policy_id : mixed = null
getCovidAffected()
public
getCovidAffected() : mixed
getPolicies()
public
getPolicies() : mixed
getPoliciesData()
Get Array
public
getPoliciesData() : array<string|int, mixed>
Return an array of policies.
Return values
array<string|int, mixed> —Array of policies in the form [ {id} , {text} ]
getPolicyDetails()
public
getPolicyDetails(mixed $policyID) : mixed
Parameters
- $policyID : mixed
getSetDescriptions()
public
getSetDescriptions() : mixed
limitToArray()
public
limitToArray(mixed $policies) : mixed
Parameters
- $policies : mixed
limitToSet()
Limit To Set
public
limitToSet(string $set) : self
Limit the policies to those in a set and order accordingly
Parameters
- $set : string
-
The name of the set to use.
Return values
selfshuffle()
Shuffle
public
shuffle() : self
Shuffles the list of policy positions.