ReflectionCallback
class ReflectionCallback extends AbstractReflectionValueProxy
The callback 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.
No description
Representation of the object
This will transmit a method's call to the proxy if it exists
Returns the callable value (ready to be called).
Returns a reflector object for the callable
Returns the type of the value
Invokes the callback with a list of parameters
Invokes the callback with a list of parameters as an array
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 71
__construct(
mixed $value,
int $flag = ValueType::MODE_STRICT)
at line 146
string
__toString()
Representation of the object
If an exception is caught, its message is returned instead of the original result (but it is not thrown ahead).
in
AbstractReflectionValue at line 81
mixed
getValue()
Returns the current value
in
AbstractReflectionValue at line 91
string
getValueType()
Returns the type of the value
in
AbstractReflectionValueProxy at line 77
mixed
__call(
string $name,
array $arguments)
This will transmit a method's call to the proxy if it exists
at line 89
callable
getCallback()
Returns the callable value (ready to be called).
at line 99
ReflectionCallback
getReflector()
Returns a reflector object for the callable
at line 112
string
getCallbackType()
Returns the type of the value
at line 122
mixed
invoke()
Invokes the callback with a list of parameters
at line 133
mixed
invokeArgs(
array $args)
Invokes the callback with a list of parameters as an array