NumberBucket Process

This example shows the usage of NumberBucket process

namecharity
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 NumberBucket(array(
    "charity"=>array(
        "step"=>20,
        "prefix"=>"$"
    )
)))
namecharity
John $0 - $20
Marry $0 - $20
Peter $0 - $20
David $0 - $20
Jane $20 - $40
Donald $40 - $60
Them $60 - $80
Smith $0 - $20
Johny $0 - $20
Michael $80 - $100
Jolie $60 - $80
Bradpit $40 - $60
Eddie $20 - $40

->pipe(new Group(array(
    "by"=>"charity",
    "count"=>"count"
)))
charitycount
$0 - $20 6
$20 - $40 2
$40 - $60 2
$60 - $80 2
$80 - $100 1
Description