TypedNoDefaultReflectionPropertyBase
PHP Typed No Default Reflection Property Base - special override for typed properties without a default value.
Table of Contents
- getValue() : mixed
- {@inheritDoc}
- setValue() : void
- {@inheritDoc}
Methods
getValue()
{@inheritDoc}
public
getValue([object $object = null ]) : mixed
Checks that a typed property is initialized before accessing its value. This is necessary to avoid PHP error "Error: Typed property must not be accessed before initialization". Should be used only for reflecting typed properties without a default value.
Parameters
- $object : object = null
Return values
mixed —setValue()
{@inheritDoc}
public
setValue(object $object[, mixed $value = null ]) : void
Works around the problem with setting typed no default properties to NULL which is not supported, instead unset() to uninitialize.
Parameters
- $object : object
- $value : mixed = null