just another orm...
View the Project on GitHub tflori/orm
» API Reference » ORM\Dbal\Type\Enum
Extends: ORM\Dbal\Type
public function __construct(string[] $allowedValues)
Parameter | Type | Description |
---|---|---|
$allowedValues |
string[] |
ORM\Dbal\Type\Enum::__construct
public static function factory(
\ORM\Dbal\Dbal $dbal,
array $columnDefinition,
): static
This method is only for types covered by mapping. Use fromDefinition instead for custom types.
Static | This method is static. | |
Returns | static |
Parameter | Type | Description |
---|---|---|
$dbal |
ORM\Dbal\Dbal | |
$columnDefinition |
array |
ORM\Dbal\Type\Enum::factory
public static function fits(array $columnDefinition): bool
Static | This method is static. | |
Returns | bool |
Parameter | Type | Description |
---|---|---|
$columnDefinition |
array |
ORM\Dbal\Type\Enum::fits
public function getAllowedValues(): string[]
Returns | string[] |
ORM\Dbal\Type\Enum::getAllowedValues
public function validate(mixed $value): bool|\ORM\Dbal\Error
Returns | bool|ORM\Dbal\Error |
Parameter | Type | Description |
---|---|---|
$value |
mixed |
ORM\Dbal\Type\Enum::validate