static function set_format($format) { if (in_array($format, self::$allowed_formats)) { self::$format = $format; } }