FloatField extends ScalarField
Entity field class for enum data type
Tags
Table of Contents
Methods
- __construct() : mixed
- FloatField constructor.
- addFetchDataModifier() : $this
- addSaveDataModifier() : $this
- addValidator() : $this
- cast() : float|mixed
- Casts value strictly to field type.
- configureAutocomplete() : $this
- configureBinary() : ScalarField
- configureColumnName() : $this
- configureDefaultValue() : $this
- configureNullable() : ScalarField
- configurePrecision() : $this
- configurePrimary() : $this
- configurePrivate() : ScalarField
- configureRequired() : $this
- configureScale() : $this
- configureSerialized() : $this
- configureTitle() : $this
- Lang phrase
- configureUnique() : $this
- convertValueFromDb() : float|mixed
- Returns value converted from SQL raw result.
- convertValueToDb() : string
- Returns raw SQL with escaped and quoted value.
- getClassByOldDataType() : bool
- getColumnName() : mixed
- getConnection() : Connection
- getDataType() : null|string
- getDefaultValue() : callable|mixed|null
- getEntity() : mixed
- getFetchDataModifiers() : array<string|int, mixed>|array<string|int, callable>|null
- getGetterTypeHint() : string
- getLangCode() : mixed
- getName() : mixed
- getOldDataTypeByClass() : bool
- getOldDataTypeByField() : bool
- getParameter() : mixed
- getParentField() : Field
- getPrecision() : int|null
- getSaveDataModifiers() : array<string|int, mixed>|array<string|int, callable>|null
- getScale() : int|null
- getSetterTypeHint() : string
- getTitle() : mixed
- getTypeMask() : int
- getValidators() : array<string|int, callable>|array<string|int, Validator>
- hasParameter() : mixed
- isAutocomplete() : mixed
- isBinary() : bool
- isNullable() : bool
- isPrimary() : mixed
- isPrivate() : bool
- isRequired() : mixed
- isSerialized() : bool
- isUnique() : mixed
- isValueEmpty() : mixed
- modifyValueBeforeSave() : mixed
- postInitialize() : null
- Called after being initialized by Entity
- resetEntity() : mixed
- serialize() : mixed
- setColumnName() : mixed
- setConnection() : mixed
- setEntity() : mixed
- setName() : mixed
- setParameter() : mixed
- setParentField() : mixed
- setSerialized() : mixed
- unserialize() : mixed
- validateValue() : Result
Methods
__construct()
FloatField constructor.
public
__construct(mixed $name[, array<string|int, mixed> $parameters = array() ]) : mixed
Parameters
- $name : mixed
- $parameters : array<string|int, mixed> = array()
-
deprecated, use configure* and add* methods instead
Tags
addFetchDataModifier()
public
addFetchDataModifier(callable $modifier) : $this
Parameters
- $modifier : callable
Tags
Return values
$thisaddSaveDataModifier()
public
addSaveDataModifier(callable $modifier) : $this
Parameters
- $modifier : callable
Tags
Return values
$thisaddValidator()
public
addValidator(Validator|callable $validator) : $this
Parameters
- $validator : Validator|callable
Tags
Return values
$thiscast()
Casts value strictly to field type.
public
cast(mixed $value) : float|mixed
Parameters
- $value : mixed
Return values
float|mixedconfigureAutocomplete()
public
configureAutocomplete([bool $value = true ]) : $this
Parameters
- $value : bool = true
Return values
$thisconfigureBinary()
public
configureBinary([bool $value = true ]) : ScalarField
Parameters
- $value : bool = true
Return values
ScalarFieldconfigureColumnName()
public
configureColumnName(string $value) : $this
Parameters
- $value : string
Return values
$thisconfigureDefaultValue()
public
configureDefaultValue(callable|mixed $value) : $this
Parameters
- $value : callable|mixed
Return values
$thisconfigureNullable()
public
configureNullable([bool $value = true ]) : ScalarField
Parameters
- $value : bool = true
Return values
ScalarFieldconfigurePrecision()
public
configurePrecision(int $precision) : $this
Parameters
- $precision : int
Return values
$thisconfigurePrimary()
public
configurePrimary([bool $value = true ]) : $this
Parameters
- $value : bool = true
Return values
$thisconfigurePrivate()
public
configurePrivate([bool $value = true ]) : ScalarField
Parameters
- $value : bool = true
Return values
ScalarFieldconfigureRequired()
public
configureRequired([bool $value = true ]) : $this
Parameters
- $value : bool = true
Return values
$thisconfigureScale()
public
configureScale(mixed $scale) : $this
Parameters
- $scale : mixed
Return values
$thisconfigureSerialized()
public
configureSerialized() : $this
Tags
Return values
$thisconfigureTitle()
Lang phrase
public
configureTitle(mixed $title) : $this
Parameters
- $title : mixed
Return values
$thisconfigureUnique()
public
configureUnique([bool $value = true ]) : $this
Parameters
- $value : bool = true
Return values
$thisconvertValueFromDb()
Returns value converted from SQL raw result.
public
convertValueFromDb(mixed $value) : float|mixed
Parameters
- $value : mixed
Tags
Return values
float|mixedconvertValueToDb()
Returns raw SQL with escaped and quoted value.
public
convertValueToDb(mixed $value) : string
Parameters
- $value : mixed
Tags
Return values
stringgetClassByOldDataType()
public
static getClassByOldDataType(mixed $dateType) : bool
Parameters
- $dateType : mixed
Return values
boolgetColumnName()
public
getColumnName() : mixed
getConnection()
public
getConnection() : Connection
Tags
Return values
ConnectiongetDataType()
public
getDataType() : null|string
Return values
null|stringgetDefaultValue()
public
getDefaultValue([array<string|int, mixed> $row = null ]) : callable|mixed|null
Parameters
- $row : array<string|int, mixed> = null
-
ORM data row in case of dependency value on other values
Return values
callable|mixed|nullgetEntity()
public
getEntity() : mixed
getFetchDataModifiers()
public
getFetchDataModifiers() : array<string|int, mixed>|array<string|int, callable>|null
Tags
Return values
array<string|int, mixed>|array<string|int, callable>|nullgetGetterTypeHint()
public
getGetterTypeHint() : string
Return values
stringgetLangCode()
public
getLangCode() : mixed
getName()
public
getName() : mixed
getOldDataTypeByClass()
public
static getOldDataTypeByClass(mixed $class) : bool
Parameters
- $class : mixed
Return values
boolgetOldDataTypeByField()
public
static getOldDataTypeByField(Field $field) : bool
Parameters
- $field : Field
Return values
boolgetParameter()
public
getParameter(mixed $name) : mixed
Parameters
- $name : mixed
getParentField()
public
getParentField() : Field
Return values
FieldgetPrecision()
public
getPrecision() : int|null
Return values
int|nullgetSaveDataModifiers()
public
getSaveDataModifiers() : array<string|int, mixed>|array<string|int, callable>|null
Tags
Return values
array<string|int, mixed>|array<string|int, callable>|nullgetScale()
public
getScale() : int|null
Return values
int|nullgetSetterTypeHint()
public
getSetterTypeHint() : string
Return values
stringgetTitle()
public
getTitle() : mixed
getTypeMask()
public
getTypeMask() : int
Return values
intgetValidators()
public
getValidators() : array<string|int, callable>|array<string|int, Validator>
Tags
Return values
array<string|int, callable>|array<string|int, Validator>hasParameter()
public
hasParameter(mixed $name) : mixed
Parameters
- $name : mixed
isAutocomplete()
public
isAutocomplete() : mixed
isBinary()
public
isBinary() : bool
Return values
boolisNullable()
public
isNullable() : bool
Return values
boolisPrimary()
public
isPrimary() : mixed
isPrivate()
public
isPrivate() : bool
Return values
boolisRequired()
public
isRequired() : mixed
isSerialized()
public
isSerialized() : bool
Return values
boolisUnique()
public
isUnique() : mixed
isValueEmpty()
public
isValueEmpty(mixed $value) : mixed
Parameters
- $value : mixed
modifyValueBeforeSave()
public
modifyValueBeforeSave(mixed $value, mixed $data) : mixed
Parameters
- $value : mixed
- $data : mixed
Tags
postInitialize()
Called after being initialized by Entity
public
postInitialize() : null
Return values
nullresetEntity()
public
resetEntity() : mixed
serialize()
public
serialize(mixed $value) : mixed
Parameters
- $value : mixed
setColumnName()
public
setColumnName(string $column_name) : mixed
Parameters
- $column_name : string
setConnection()
public
setConnection(mixed $connection) : mixed
Parameters
- $connection : mixed
setEntity()
public
setEntity(Entity $entity) : mixed
Parameters
- $entity : Entity
Tags
setName()
public
setName(mixed $name) : mixed
Parameters
- $name : mixed
setParameter()
public
setParameter(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
setParentField()
public
setParentField(Field $parentField) : mixed
Parameters
- $parentField : Field
setSerialized()
public
setSerialized() : mixed
Tags
unserialize()
public
unserialize(mixed $value) : mixed
Parameters
- $value : mixed
validateValue()
public
validateValue(mixed $value, mixed $primary, mixed $row, Result $result) : Result
Parameters
- $value : mixed
- $primary : mixed
- $row : mixed
- $result : Result