Abstract base class to determine if a gate is passed. A gate can look at the credit union and if that passes look to see if there is an additional username filter. The minimal implementation is for a credit union to pass. Other entry points will allow testing of other parameters to make sure those requirements pass the gate check.
Definition at line 11 of file FeatureGate.i.
| FeatureGate::GetFeatureParams |
( |
String |
$creditUnion | ) |
|
|
protected |
Return the params for a particular feature. This should only be called if the caller knows the credit union is allowed (i.e DetermineCreditUnionPass returned true).
params would be json string object in the form: {"creditUnion":{"usernames":["BongoBob","958777"],"ip":["192.168.1.14"],"someOtherParam":["item1","item2"]}} example: {"MYCU":{"usernames":["smith","jones"]}, "SCRUBCU":{"usernames":["bongobob", "4188"]}}
- Parameters
-
| String | $feature | Indicates which feature to gate |
- Returns
- bool|array
Definition at line 79 of file FeatureGate.i.
80 if ($this->featureGateConfig->HasFeature($this->feature)) {
81 $config = $this->featureGateConfig->GetFeatureData($this->feature);
83 if ( $config && is_array($config) && array_key_exists(
"params", $config) ) {
85 $paramsByCU = $config[
"params"];
86 $returnArray = isset( $paramsByCU[$creditUnion] ) ? $paramsByCU[$creditUnion] : array();