/** * @return array */ public function get_levers($id) { if ($id == $this->get_ID()) { $levers = $this->obj->get_levers(); return $levers; } else { return false; } }
/** * Choose a variant * * @since 0.4.0 * * @return mixed */ public function choose() { $record = !ingot_is_no_testing_mode(); if (!$this->random_mode) { $val = $this->bandit->chooseLever($this->experiment, $record)->getValue(); } else { if (is_null($this->obj)) { $this->set_group_obj(); } $val = $this->random_lever($this->obj->get_levers()); } return $val; }