public function getLdapValue() { if ($this->never) { $value = self::NEVER; } else { $total = 0; foreach (self::UNIT as $unit => $conversion) { $total += $this->{$unit} * $conversion; } $value = number_format($total, 0, '.', ''); } return $value; }