public static function addDocumentType($type) { if (!in_array($type, self::$types)) { self::$types[] = $type; } }