Exemplo n.º 1
0
 public function saveLever(\MaBandit\Lever $lever)
 {
     if (!array_key_exists($lever->experiment, $this->_levers) or !is_array($this->_levers[$lever->experiment])) {
         $this->_levers[$lever->experiment] = array();
     }
     $this->_levers[$lever->experiment][$lever->getValue()] = $lever;
     return $lever;
 }
Exemplo n.º 2
0
 /**
  * Calculate stats for one lever
  *
  * @since 0.4.0
  *
  * @access protected
  *
  * @param \MaBandit\Lever $lever
  */
 protected function lever_stats($lever)
 {
     $this->stats['variants'][$lever->getValue()] = new stats($lever->getDenominator(), $lever->getNumerator(), $lever->getConversionRate());
 }