com\setasign\SetaSite\PropertyContainer\Property

FloatProperty

File: /SetaSite/src/PropertyContainer/Property/FloatProperty.php

Class hierarchy

Implements

Summary

Constants

VALIDATOR_EMPTY

public const FloatProperty::VALIDATOR_EMPTY = 'empty'

VALIDATOR_MAX

public const FloatProperty::VALIDATOR_MAX = 'max'

VALIDATOR_MIN

public const FloatProperty::VALIDATOR_MIN = 'min'

Properties

$config

protected \com\setasign\SetaFramework\Config\Config AbstractProperty::$config

$floatPrecision

protected int FloatProperty::$floatPrecision = 2

$value

protected mixed AbstractProperty::$value

Static Methods

cleanupConfig()

public static AbstractProperty::cleanupConfig (
\com\setasign\SetaFramework\Config\Config $config
): void
Parameters
$config : \com\setasign\SetaFramework\Config\Config
 

Methods

__construct()

public FloatProperty::__construct (
\com\setasign\SetaSite\PropertyContainer\ContainerParent\ContainerParentInterface $containerParent,
?\com\setasign\SetaFramework\Config\Config $config = null
)

FloatProperty constructor.

Parameters
$containerParent : \com\setasign\SetaSite\PropertyContainer\ContainerParent\ContainerParentInterface
 
$config : ?\com\setasign\SetaFramework\Config\Config
 

__clone()

public AbstractProperty::__clone (
void
): void

__toString()

public FloatProperty::__toString (
void
): string

exportValue()

public FloatProperty::exportValue (
void
): mixed

Export the value, to use it in a Database

getConfig()

public AbstractProperty::getConfig (
void
): \com\setasign\SetaFramework\Config\Config

getDefaultValue()

public AbstractProperty::getDefaultValue (
void
): void

getFloatPrecision()

public FloatProperty::getFloatPrecision (
void
): int

getValidators()

public AbstractProperty::getValidators (
void
): \com\setasign\SetaFramework\Config\Config

getValue()

public AbstractProperty::getValue (
void
): mixed

isNull()

public AbstractProperty::isNull (
void
): bool

Checks whether the value is null

isValid()

public FloatProperty::isValid (
array &$result = array ( )
): bool

Checks whether the value of the property is valid

Parameters
$result : array
 

parseValue()

protected FloatProperty::parseValue (
mixed $value
): mixed

Parses the value to the correct format

Parameters
$value : mixed
 

setFloatPrecision()

public FloatProperty::setFloatPrecision (
int $floatPrecision
): void
Parameters
$floatPrecision : int
 

setValue()

public AbstractProperty::setValue (
mixed $value,
bool $ignoreEditable = false
): void

Sets the value

Strings that are empty will be null

Parameters
$value : mixed
 
$ignoreEditable : bool

Ignore editable property, only for internal use!