Cerys
6 months ago
2 changed files with 57 additions and 0 deletions
@ -0,0 +1,27 @@ |
|||
<?php |
|||
|
|||
namespace Darksparrow\DeegraphPHP\SchemaBuilder\Attributes; |
|||
|
|||
|
|||
use PhpParser\Node\Attribute; |
|||
use ReflectionClass; |
|||
|
|||
#[\Attribute] |
|||
class SchemaDocument extends Attribute |
|||
{ |
|||
public int $MaximumSize; |
|||
public string $Comment; |
|||
public string $MIMEType; |
|||
|
|||
public function __construct( |
|||
int $maxSize = 0, |
|||
string $comment = "", |
|||
string $mimeType = "" |
|||
) |
|||
{ |
|||
$this->MaximumSize = $maxSize; |
|||
$this->Comment = $comment; |
|||
$this->MIMEType = $mimeType; |
|||
parent::__construct("SchemaDocument", [], []); |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
<?php |
|||
|
|||
namespace Darksparrow\DeegraphPHP\SchemaBuilder\Attributes; |
|||
|
|||
|
|||
use Darksparrow\DeegraphPHP\Enumerators\SchemaFieldExistence; |
|||
use PhpParser\Node\Attribute; |
|||
|
|||
#[\Attribute] |
|||
class SchemaDocumentField extends Attribute |
|||
{ |
|||
public SchemaFieldExistence $Existence; |
|||
public string $Comment; |
|||
public array $ValidSchemas; |
|||
public int $MaxSize; |
|||
|
|||
public function __construct( |
|||
SchemaFieldExistence $existence, |
|||
string $comment = "", |
|||
array $validSchemas = [], |
|||
int $maxSize = 0 |
|||
) |
|||
{ |
|||
$this->Existence = $existence; |
|||
$this->Comment = $comment; |
|||
$this->ValidSchemas = $validSchemas; |
|||
parent::__construct("SchemaDocumentField", [], []); |
|||
} |
|||
|
|||
} |
Loading…
Reference in new issue