ReflectionBoolean
class ReflectionBoolean extends AbstractReflectionValue
The boolean value reflector
Traits
\Reflector::export()
method
Methods
Creation of a new instance of the mother class on-the-fly
Defines the read-only properties names and accessors.
Magic setter to avoid setting read-only properties.
Magic un-setter to avoid un-setting read-only properties.
Use the ValueType::BINARY_AS_BOOLEAN
flag to allow binaries 0
and 1
as boolean values
Representation of the object
Details
in
ReflectorTrait at line 54
static
string|null
export(
mixed $argument,
bool $return = false)
Creation of a new instance of the mother class on-the-fly
Keep in mind that this method only consider the FIRST argument passed to transmit to the constructor. If your mother class requires more than one argument, you will have to over-write this method (or to not use the trait).
in
ReadOnlyPropertiesTrait at line 54
void
setReadOnlyProperties(
array $data)
Defines the read-only properties names and accessors.
Each key => value
pair of the $data
array must be constructed like:
key
is the name of the property (MUST be defined with protected access in the child class)value
is an accessor for that property: the name of the access method if it exists ortrue
for the default$obj->$key
accessor.
in
ReadOnlyPropertiesTrait at line 85
mixed
__get(
string $name)
Magic getter for read-only properties.
This will trigger a notice if the property can not be accessed.
in
ReadOnlyPropertiesTrait at line 109
void
__set(
string $name,
mixed $value)
Magic setter to avoid setting read-only properties.
in
ReadOnlyPropertiesTrait at line 125
void
__unset(
string $name)
Magic un-setter to avoid un-setting read-only properties.
at line 44
__construct(
mixed $value,
int $flag = ValueType::MODE_STRICT)
Use the ValueType::BINARY_AS_BOOLEAN
flag to allow binaries 0
and 1
as boolean values
at line 61
string
__toString()
Representation of the object
in
AbstractReflectionValue at line 81
mixed
getValue()
Returns the current value
in
AbstractReflectionValue at line 91
string
getValueType()
Returns the type of the value