NumberRange Process
This example shows the usage of NumberRange process
name | charity |
John |
$5 |
Marry |
$13 |
Peter |
$15 |
David |
$10 |
Jane |
$20 |
Donald |
$50 |
Them |
$60 |
Smith |
$10 |
Johny |
$17 |
Michael |
$90 |
Jolie |
$65 |
Bradpit |
$45 |
Eddie |
$35 |
->pipe(new NumberRange(array(
"charity"=>array(
"Low"=>array(null,20),
"Medium"=>array(20,50),
"High"=>array(50,null),
)
)))
name | charity |
John |
Low |
Marry |
Low |
Peter |
Low |
David |
Low |
Jane |
Medium |
Donald |
High |
Them |
High |
Smith |
Low |
Johny |
Low |
Michael |
High |
Jolie |
High |
Bradpit |
Medium |
Eddie |
Medium |
->pipe(new Group(array(
"by"=>"charity",
"count"=>"count"
)))
charity | count |
High |
4 |
Low |
6 |
Medium |
3 |
The example demonstrates usage of `NumberRange` process. The NumberRange let you define custom name for a range. Like in above example, we define charity amount less than $20 is __Low__, from 20 to less than 50 is __Medium__ and higher or equal to $50 is __High__.
The NumberRange is normally used with Group process as above example showing.