Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter Class Reference
Inheritance diagram for eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter:

## Public Member Functions
| toStorageValue (FieldValue $value, StorageFieldValue $storageFieldValue)
| Converts data from $value to $storageFieldValue. More...
| toFieldValue (StorageFieldValue $value, FieldValue $fieldValue)
| Converts data from $value to $fieldValue. More...
| toStorageFieldDefinition (FieldDefinition $fieldDef, StorageFieldDefinition $storageDef)
| Converts field definition data in $fieldDef into $storageFieldDef. More...
| toFieldDefinition (StorageFieldDefinition $storageDef, FieldDefinition $fieldDef)
| Converts field definition data in $storageDef into $fieldDef. More...
| getIndexColumn ()
| Returns the name of the index column in the attribute table. More...

## Static Public Member Functions
static | create ()
| Factory for current class. More...

## Public Attributes
const | FLOAT_VALIDATOR_IDENTIFIER = 'FloatValueValidator'
const | HAS_MIN_VALUE = 1
const | HAS_MAX_VALUE = 2

## Private Member Functions
| getStorageDefValidatorState ($minValue, $maxValue)
| Returns validator state for storage definition. More...

## Detailed Description

Definition at line 15 of file FloatConverter.php.

## Member Function Documentation

## ◆ create()

static eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter::create | ( |  | ) |
| static

Factory for current class.

Note: Class should instead be configured as service if it gains dependencies.

Deprecated:
  since 6.8, will be removed in 7.x, use default constructor instead.

Returns
  static

Definition at line 31 of file FloatConverter.php.

## ◆ getIndexColumn()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter::getIndexColumn | ( |  | ) |

Returns the name of the index column in the attribute table.

Returns the name of the index column the datatype uses, which is either "sort_key_int" or "sort_key_string". This column is then used for filtering and sorting for this type.

Returns
  string

Implements eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter.

Definition at line 113 of file FloatConverter.php.

## ◆ getStorageDefValidatorState()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter::getStorageDefValidatorState | ( |  | $minValue,
|  |  | $maxValue
| ) |  |
| private

Returns validator state for storage definition.

Validator state is a bitfield value composed of:

- self::HAS_MAX_VALUE
- self::HAS_MIN_VALUE.

Parameters

  int | null | $minValue | Minimum int value, or null if not set
  int | null | $maxValue | Maximum int value, or null if not set

Returns
  int

Definition at line 129 of file FloatConverter.php.

References eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter\HAS_MAX_VALUE, and eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter\HAS_MIN_VALUE.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter\toStorageFieldDefinition().

## ◆ toFieldDefinition()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter::toFieldDefinition | ( | StorageFieldDefinition | $storageDef,
|  | FieldDefinition | $fieldDef
| ) |  |

Converts field definition data in $storageDef into $fieldDef.

The constant (HAS_MIN_VALUE, HAS_MAX_VALUE) are set if the field max or min are define

Parameters

  \eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition | $storageDef |
  \eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition | $fieldDef |

Implements eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter.

Definition at line 89 of file FloatConverter.php.

References eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter\FLOAT_VALIDATOR_IDENTIFIER.

## ◆ toFieldValue()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter::toFieldValue | ( | StorageFieldValue | $value,
|  | FieldValue | $fieldValue
| ) |  |

Converts data from $value to $fieldValue.

Parameters

  \eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue | $value |
  \eZ\Publish\SPI\Persistence\Content\FieldValue | $fieldValue |

Implements eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter.

Definition at line 54 of file FloatConverter.php.

## ◆ toStorageFieldDefinition()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter::toStorageFieldDefinition | ( | FieldDefinition | $fieldDef,
|  | StorageFieldDefinition | $storageDef
| ) |  |

Converts field definition data in $fieldDef into $storageFieldDef.

Parameters

  \eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition | $fieldDef |
  \eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition | $storageDef |

Implements eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter.

Definition at line 66 of file FloatConverter.php.

References eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter\FLOAT_VALIDATOR_IDENTIFIER, and eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter\getStorageDefValidatorState().

## ◆ toStorageValue()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter::toStorageValue | ( | FieldValue | $value,
|  | StorageFieldValue | $storageFieldValue
| ) |  |

Converts data from $value to $storageFieldValue.

Parameters

  \eZ\Publish\SPI\Persistence\Content\FieldValue | $value |
  \eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue | $storageFieldValue |

Implements eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter.

Definition at line 42 of file FloatConverter.php.

## Member Data Documentation

## ◆ FLOAT_VALIDATOR_IDENTIFIER

const eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter::FLOAT_VALIDATOR_IDENTIFIER = 'FloatValueValidator'

Definition at line 17 of file FloatConverter.php.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter\toFieldDefinition(), and eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter\toStorageFieldDefinition().

## ◆ HAS_MAX_VALUE

const eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter::HAS_MAX_VALUE = 2

Definition at line 20 of file FloatConverter.php.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter\getStorageDefValidatorState().

## ◆ HAS_MIN_VALUE

const eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter::HAS_MIN_VALUE = 1

Definition at line 19 of file FloatConverter.php.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter\getStorageDefValidatorState().

The documentation for this class was generated from the following file:

- FloatConverter.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.