Documentation

Denormalizer
in package

FinalYes

Table of Contents

Properties

$afterMappingCalls  : array<string|int, ReflectionMethod>
$class  : ReflectionClass
$convertEmptyStringToNull  : bool
$mapRecord  : MapRecord|null
$properties  : array<string|int, ReflectionProperty>
$propertySetters  : array<string|int, PropertySetter>

Methods

__construct()  : mixed
aliases()  : array<string, string>
allowEmptyStringAsNull()  : void
assign()  : object
assignAll()  : Iterator
denormalize()  : object
denormalizeAll()  : Iterator
disallowEmptyStringAsNull()  : void
registerAlias()  : void
Register a callback to convert a field into a specific type.
registerType()  : void
Register a global type conversion callback to convert a field into a specific type.
resolveTypeCaster()  : string|null
supportsAlias()  : bool
types()  : array<string|int, string>
unregisterAlias()  : bool
unregisterAll()  : void
unregisterAllAliases()  : void
unregisterAllTypes()  : void
unregisterType()  : bool
Unregister a global type conversion callback to convert a field into a specific type.
autoDiscoverPropertySetter()  : PropertySetter|null
findPropertySetter()  : PropertySetter|null
getMethodFirstArgument()  : ReflectionParameter
getTypeCasting()  : TypeCasting
resolveTypeCasting()  : TypeCasting
setAfterMappingCalls()  : array<string|int, ReflectionMethod>
setClass()  : ReflectionClass
setPropertySetters()  : array<string|int, PropertySetter>

Properties

$afterMappingCalls read-only

private array<string|int, ReflectionMethod> $afterMappingCalls

$convertEmptyStringToNull

private static bool $convertEmptyStringToNull = true

$properties read-only

private array<string|int, ReflectionProperty> $properties

$propertySetters read-only

private array<string|int, PropertySetter> $propertySetters

Methods

__construct()

public __construct(class-string $className[, array<string|int, string> $propertyNames = [] ]) : mixed
Parameters
$className : class-string
$propertyNames : array<string|int, string> = []
Tags
throws
MappingFailed

aliases()

public static aliases() : array<string, string>
Return values
array<string, string>

assignAll()

public static assignAll(class-string $className, iterable<string|int, mixed> $records[, array<string|int, string> $propertyNames = [] ]) : Iterator
Parameters
$className : class-string
$records : iterable<string|int, mixed>
$propertyNames : array<string|int, string> = []
Tags
throws
MappingFailed
throws
TypeCastingFailed
Return values
Iterator

denormalizeAll()

public denormalizeAll(iterable<string|int, mixed> $records) : Iterator
Parameters
$records : iterable<string|int, mixed>
Return values
Iterator

registerAlias()

Register a callback to convert a field into a specific type.

public static registerAlias(string $alias, string $type, Closure $callback) : void
Parameters
$alias : string
$type : string
$callback : Closure
Tags
throws
MappingFailed

registerType()

Register a global type conversion callback to convert a field into a specific type.

public static registerType(string $type, Closure $callback) : void
Parameters
$type : string
$callback : Closure
Tags
throws
MappingFailed

resolveTypeCaster()

public resolveTypeCaster(MapCell $mapCell, ReflectionMethod|ReflectionProperty $accessor) : string|null
Parameters
$mapCell : MapCell
$accessor : ReflectionMethod|ReflectionProperty
Return values
string|null

supportsAlias()

public static supportsAlias(string $alias) : bool
Parameters
$alias : string
Return values
bool

types()

public static types() : array<string|int, string>
Return values
array<string|int, string>

unregisterAlias()

public static unregisterAlias(string $alias) : bool
Parameters
$alias : string
Return values
bool

unregisterAllAliases()

public static unregisterAllAliases() : void

unregisterAllTypes()

public static unregisterAllTypes() : void

unregisterType()

Unregister a global type conversion callback to convert a field into a specific type.

public static unregisterType(string $type) : bool
Parameters
$type : string
Return values
bool

autoDiscoverPropertySetter()

private autoDiscoverPropertySetter(ReflectionMethod|ReflectionProperty $accessor, array<string|int, string> $propertyNames, array<string|int, string|null> $methodNames) : PropertySetter|null
Parameters
$accessor : ReflectionMethod|ReflectionProperty
$propertyNames : array<string|int, string>
$methodNames : array<string|int, string|null>
Tags
throws
MappingFailed
Return values
PropertySetter|null

findPropertySetter()

private findPropertySetter(MapCell $mapCell, ReflectionMethod|ReflectionProperty $accessor, array<string|int, string> $propertyNames) : PropertySetter|null
Parameters
$mapCell : MapCell
$accessor : ReflectionMethod|ReflectionProperty
$propertyNames : array<string|int, string>
Tags
throws
MappingFailed
Return values
PropertySetter|null

getMethodFirstArgument()

private getMethodFirstArgument(ReflectionMethod $reflectionMethod) : ReflectionParameter
Parameters
$reflectionMethod : ReflectionMethod
Tags
throws
MappingFailed
Return values
ReflectionParameter

getTypeCasting()

private getTypeCasting(string $typeCaster, ReflectionProperty|ReflectionParameter $reflectionProperty, array<string|int, mixed> $options) : TypeCasting
Parameters
$typeCaster : string
$reflectionProperty : ReflectionProperty|ReflectionParameter
$options : array<string|int, mixed>
Tags
throws
MappingFailed
Return values
TypeCasting

resolveTypeCasting()

private resolveTypeCasting(ReflectionProperty|ReflectionParameter $reflectionProperty[, array<string|int, mixed> $options = [] ]) : TypeCasting
Parameters
$reflectionProperty : ReflectionProperty|ReflectionParameter
$options : array<string|int, mixed> = []
Tags
throws
MappingFailed
Return values
TypeCasting

setAfterMappingCalls()

private setAfterMappingCalls() : array<string|int, ReflectionMethod>
Return values
array<string|int, ReflectionMethod>

setClass()

private setClass(class-string $className) : ReflectionClass
Parameters
$className : class-string
Tags
throws
MappingFailed
Return values
ReflectionClass

setPropertySetters()

private setPropertySetters(array<string|int, string> $propertyNames) : array<string|int, PropertySetter>
Parameters
$propertyNames : array<string|int, string>
Tags
throws
MappingFailed
Return values
array<string|int, PropertySetter>

        
On this page

Search results