Orpheus

TypeDate extends AbstractTypeDescriptor
in package

Entity Type Date class

Table of Contents

Properties

$name  : string
The type's name
$nullable  : bool
Is this type nullable ?
$writable  : bool
Is this type writable ?

Methods

__construct()  : mixed
AbstractTypeDescriptor constructor
emptyIsNull()  : bool
Get true if we consider null an empty input string
formatSqlValue()  : mixed
Format programming value into SQL value
formatUserValue()  : string
Format programming value into user value
getHtmlInputAttr()  : array<string|int, string>
Get the html input attributes array for the given Field descriptor
getName()  : string
Get the type name
htmlInputAttr()  : string
Get the html input attributes string for the given args
isNullable()  : bool
Get true if field is nullable
isWritable()  : bool
Get true if field is writable
parseArgs()  : stdClass
Parse args from field declaration
parseSqlValue()  : Date|null
Parse SQL value into programming value
parseUserValue()  : Date
Parse user value into programming value
preFormat()  : void
Format value before being validated.
validate()  : void
Validate value This should handle a string and the final type, e.g. DateTime for TypeDatetime

Properties

Methods

__construct()

AbstractTypeDescriptor constructor

public __construct(string $name) : mixed
Parameters
$name : string

formatUserValue()

Format programming value into user value

public formatUserValue(FieldDescriptor $field, mixed $value) : string
Parameters
$field : FieldDescriptor

The field to parse

$value : mixed

The field value to parse

Tags
noinspection

PhpUnusedParameterInspection

Return values
string

htmlInputAttr()

Get the html input attributes string for the given args

public htmlInputAttr(object $args) : string
Parameters
$args : object
Return values
string

parseArgs()

Parse args from field declaration

public parseArgs(array<string|int, string> $rawArgs) : stdClass
Parameters
$rawArgs : array<string|int, string>

Arguments

Return values
stdClass

parseSqlValue()

Parse SQL value into programming value

public parseSqlValue(FieldDescriptor $field, string $value) : Date|null
Parameters
$field : FieldDescriptor

The field to parse

$value : string
Tags
throws
Exception
Return values
Date|null

preFormat()

Format value before being validated.

public preFormat(FieldDescriptor $field, mixed &$value, array<string|int, mixed> $input, PermanentEntity|null &$ref) : void

Validator should allow string and final type (string, object...) Use this function if user/developer could try to validate a validator from another type

Parameters
$field : FieldDescriptor

The field to format

$value : mixed

The field value to format

$input : array<string|int, mixed>

The input to validate

$ref : PermanentEntity|null

The object to update, may be null

validate()

Validate value This should handle a string and the final type, e.g. DateTime for TypeDatetime

public validate(FieldDescriptor $field, string &$value, array<string|int, mixed> $input, PermanentEntity|null &$ref) : void
Parameters
$field : FieldDescriptor

The field to validate

$value : string

The field value to validate

$input : array<string|int, mixed>

The input to validate

$ref : PermanentEntity|null

The object to update, may be null

Tags
throws
InvalidTypeFormat
see
AbstractTypeDescriptor::validate()

							
On this page

Search results