protected function _getOperator() { /* switch mode */ switch ($this->_mode) { case 2: $output = 1; break; case 3: $output = -1; break; default: $output = mt_rand(0, 1) * 2 - 1; break; } return $output; }