This commit is contained in:
2023-01-11 22:05:02 +01:00
parent 777fa8ffad
commit b0e98033b4
5 changed files with 61 additions and 27 deletions

View File

@@ -4,8 +4,10 @@ namespace Core\API\Parameter;
class StringType extends Parameter {
const UNLIMITED = -1;
public int $maxLength;
public function __construct(string $name, int $maxLength = -1, bool $optional = FALSE, ?string $defaultValue = NULL, ?array $choices = NULL) {
public function __construct(string $name, int $maxLength = self::UNLIMITED, bool $optional = FALSE, ?string $defaultValue = NULL, ?array $choices = NULL) {
$this->maxLength = $maxLength;
parent::__construct($name, Parameter::TYPE_STRING, $optional, $defaultValue, $choices);
}