Solver
in package
Discover, validate and execute the desired method call
Tags
Table of Contents
- $declared_methods : array<string|int, mixed>
- __construct() : mixed
- solve() : mixed
- Checks if the called method has the matching signature
- UndefinedMethodError() : Error
- Checks if the called method has the matching signature
Properties
$declared_methods
private
array<string|int, mixed>
$declared_methods
= []
List of available methods
Methods
__construct()
public
__construct(MagicallyInvokedMethod ...$methods) : mixed
Parameters
- $methods : MagicallyInvokedMethod
-
List of available methods
Tags
Return values
mixed —solve()
Checks if the called method has the matching signature
public
solve(object $instance, string $name[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
- $instance : object
-
Object for method invocation
- $name : string
-
Method name
- $arguments : array<string|int, mixed> = []
-
Method arguments
Tags
Return values
mixed —The return varies according to the invoked method
UndefinedMethodError()
Checks if the called method has the matching signature
public
static UndefinedMethodError(object $instance, string $name, array<string|int, mixed> $arguments) : Error
Parameters
- $instance : object
-
Object for method invocation
- $name : string
-
Method name
- $arguments : array<string|int, mixed>
-
Method arguments
Tags
Return values
Error —Create an error when method is undefined