RemoveColumn

Introduction #

Sometime you may want to simplify your data flow by removing some of columns from the datapipe. You can do so with RemoveColumn process. This process will act like a filter which only let other columns except for the columns specified passing through.

Example #

<?php
use \koolreport\processes\RemoveColumn;
class MyReport extends \koolreport\KoolReport
{
    public function setup()
    {
        ...
        ->pipe(new RemoveColumn(array(
            "extraInfo","unwantedColumn"
        )))
        ...
    }
}

Code explanation:

  1. In this example, we use RemoveColumn process with two columns name input "extraInfo" and "unwantedColumn".
  2. After data is piped though the RemoveColumn process, two columns "extraInfo" and "unwantedColumn" will be removed.