public static function mode($mode) { if (!in_array($mode, self::$allowedModes)) { return false; } return self::$mode = $mode; }