CalculatedColumn Process

This example shows the usage of CalculatedColumn process

namehour_rateworking_hours
John $20/hrs 123 hrs
Marry $30/hrs 112 hrs
Peter $25/hrs 132 hrs
Donald $40/hrs 89 hrs

->pipe(new CalculatedColumn(array(
    "total"=>"{hour_rate}*{working_hours}",
    "total_by_func"=>function($row){
        return $row["hour_rate"]*$row["working_hours"];
    }
)))
namehour_rateworking_hourstotaltotal_by_func
John $20/hrs 123 hrs $2,460 $2,460
Marry $30/hrs 112 hrs $3,360 $3,360
Peter $25/hrs 132 hrs $3,300 $3,300
Donald $40/hrs 89 hrs $3,560 $3,560
Description