From 25c0c960432d2b8c13117530d92584827278eea7 Mon Sep 17 00:00:00 2001 From: Cerys Date: Sun, 9 Jun 2024 02:31:21 +0100 Subject: [PATCH] added `MimeType` as as a Field --- src/SchemaBuilder/Attributes/SchemaDocumentField.php | 5 ++++- src/SchemaBuilder/SchemaBuilder.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/SchemaBuilder/Attributes/SchemaDocumentField.php b/src/SchemaBuilder/Attributes/SchemaDocumentField.php index 943fdd5..1bd026f 100644 --- a/src/SchemaBuilder/Attributes/SchemaDocumentField.php +++ b/src/SchemaBuilder/Attributes/SchemaDocumentField.php @@ -16,18 +16,21 @@ class SchemaDocumentField extends Attribute public string $Comment; public array $ValidSchemas; public int $MaxSize; + public string $MimeType; public function __construct( string $Name, SchemaFieldExistence $Existence = SchemaFieldExistence::MAY, string $Comment = "", array $ValidSchemas = [], - int $MaxSize = 0 + int $MaxSize = 0, + string $MimeType = "", ) { $this->Existence = $Existence; $this->Comment = $Comment; $this->ValidSchemas = $ValidSchemas; + $this->MimeType = $MimeType; parent::__construct(new Name("SchemaDocumentField"), [], []); } diff --git a/src/SchemaBuilder/SchemaBuilder.php b/src/SchemaBuilder/SchemaBuilder.php index 70af5ea..9b39174 100644 --- a/src/SchemaBuilder/SchemaBuilder.php +++ b/src/SchemaBuilder/SchemaBuilder.php @@ -12,7 +12,7 @@ class SchemaBuilder /** * Goes through the Attribute classes and makes a list of all the Properties they have. * This is so if a user adds another variable to the Attribute constructor, it won't appear in the final Schema. - * + * * @return array[] */ private static function GetValidKeys(): array