Class RulesProvider
A Proxy class used to remove any extra arguments when the user intended to call a method in another class that is not aware of validation providers signature
Property Summary
-
$_class protected
string|object
The class/object to proxy.
-
$_reflection protected
ReflectionClass
The proxied class' reflection
Method Summary
-
__call() public
Proxies validation method calls to the Validation class.
-
__construct() public
Constructor, sets the default class to use for calling methods
Method Detail
__call() ¶ public
__call(string $method, array $arguments): bool
Proxies validation method calls to the Validation class.
The last argument (context) will be sliced off, if the validation method's last parameter is not named 'context'. This lets the various wrapped validation methods to not receive the validation context unless they need it.
Parameters
-
string
$method the validation method to call
-
array
$arguments the list of arguments to pass to the method
Returns
bool
__construct() ¶ public
__construct(string|object $class = Validation::class)
Constructor, sets the default class to use for calling methods
Parameters
-
string|object
$class optional the default class to proxy
Throws
ReflectionException