I have the following code
class Profession_schedule extends \koolreport\KoolReport
{
use \koolreport\amazing\Theme;
var $profession_name = "";
function setup()
{
$this->src("db")
->query('CALL getProfessionSchedule(:year, :days, :profession_id)')
->params(array(
':year' => $this->params['year'],
':days' => $this->params['days'],
':profession_id' => $this->params['profession_id'],
))
->saveTo($node1);
$node1->pipe(new Cube(array(
'row' => 'hour_num',
'column' => 'day',
'max' => "teacher_name",
)))
->pipe(new \koolreport\processes\Map(array(
"{value}" => function($row) {
foreach ($row as $k => $v)
if ($v == null) $row[$k] = "";
return $row;
}
)))
->pipe(new koolreport\processes\ColumnsSort(array(
"{name}" => function($colName1, $colName2)
{
return $colName1>$colName2;
}
)))
->pipe($this->dataStore("st"));
}
}
one of the columns in the datasource is called "profession_name". I want to set the class private variable $this->profession_name with the value in the column "profession_name" without using a Map Process