\Cake\ValidationRulesProvider

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

Summary

Methods
Properties
Constants
__construct()
__call()
No public properties found
No constants found
No protected methods found
$_class
$_reflection
N/A
No private methods found
No private properties found
N/A

Properties

$_class

$_class : string|object

The class/object to proxy.

Type

string|object

$_reflection

$_reflection : \ReflectionClass

The proxied class' reflection

Type

\ReflectionClass

Methods

__construct()

__construct(string|object  $class = \Cake\Validation\Validation::class) 

Constructor, sets the default class to use for calling methods

Parameters

string|object $class

the default class to proxy

Throws

\ReflectionException

__call()

__call(string  $method, array  $arguments) : boolean

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

boolean —

whether or not the validation rule passed