public runExperiment ( |
||
$experiment | ||
return | mixed |
public function runExperiment(Experiment $experiment)
{
if ($experiment->shouldRun()) {
$report = $this->getReport($experiment);
return $report->getControl()->getValue();
}
return call_user_func_array($experiment->getControl(), $experiment->getParams());
}
/** * Execute the experiment within the laboratory. * * @return mixed */ public function run() { $this->params = func_get_args(); if ($this->laboratory) { return $this->laboratory->runExperiment($this); } return call_user_func($this->control, $this->params); }