just another orm...
View the Project on GitHub tflori/orm
» API Reference » ORM\Dbal\Type\DateTime
Extends: ORM\Dbal\Type
Name | Value |
---|---|
DATE_REGEX | '(\+|-)?\d{4,}-\d{2}-\d{2}' |
TIME_REGEX | '\d{2}:\d{2}:\d{2}(\.\d{1,6})?' |
ZONE_REGEX | '((\+|-)\d{1,2}(:?\d{2})?|Z)?' |
public function __construct(int $precision = null, bool $dateOnly = false)
Parameter | Type | Description |
---|---|---|
$precision |
int | |
$dateOnly |
bool |
ORM\Dbal\Type\DateTime::__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\DateTime::factory
public static function fits(array $columnDefinition): bool
Static | This method is static. | |
Returns | bool |
Parameter | Type | Description |
---|---|---|
$columnDefinition |
array |
ORM\Dbal\Type\DateTime::fits
public function getPrecision(): int
Returns | int |
ORM\Dbal\Type\DateTime::getPrecision
public function validate(mixed $value): bool|\ORM\Dbal\Error
Returns | bool|ORM\Dbal\Error |
Parameter | Type | Description |
---|---|---|
$value |
mixed |
ORM\Dbal\Type\DateTime::validate