- First draft of current WIP
This commit is contained in:
commit
b73d046e0a
47 files changed
+2797
No files matched your search
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Ulmus\Annotation\Property;
|
||||
|
||||
class Field implements \Ulmus\Annotation\Annotation {
|
||||
|
||||
public string $type;
|
||||
|
||||
public string $name;
|
||||
|
||||
public int $length;
|
||||
|
||||
public array $attributes = [];
|
||||
|
||||
public bool $nullable = false;
|
||||
|
||||
public function __construct(string $type = null, int $length = null)
|
||||
{
|
||||
switch(true) {
|
||||
case $type !== null:
|
||||
$this->type = $type;
|
||||
break;
|
||||
|
||||
case $length !== null:
|
||||
$this->length = $length;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user