PHP Class Neos\Flow\Property\TypeConverter\BooleanConverter

For boolean this is a no-op, integer and float are simply typecast to boolean. Strings are converted to TRUE unless they are empry or match one of 'off', 'n', 'no', 'false' (case-insensitive).
Inheritance: extends AbstractTypeConverter
Show file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$priority integer
$sourceTypes array
$targetType string

Public Methods

Method Description
convertFrom ( mixed $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : boolean Actually convert from $source to $targetType

Method Details

convertFrom() public method

Actually convert from $source to $targetType
public convertFrom ( mixed $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : boolean
$source mixed
$targetType string
$convertedChildProperties array
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
return boolean

Property Details

$priority protected property

protected int $priority
return integer

$sourceTypes protected property

protected array $sourceTypes
return array

$targetType protected property

protected string $targetType
return string