示例#1
0
 /**
  * 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;
 }
示例#2
0
文件: bandit.php 项目: Ramoonus/ingot
 /**
  * Choose a variant
  *
  * @since 0.4.0
  *
  * @return mixed
  */
 public function choose()
 {
     $record = !ingot_is_bot();
     $val = $this->bandit->chooseLever($this->experiment, $record)->getValue();
     return $val;
 }