/var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Validation
Edit: /var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Validation/RulesProvider.php (2551B)
_class = $class;
$this->_reflection = new ReflectionClass($class);
}
/**
* 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.
*
* @param string $method the validation method to call
* @param array $arguments the list of arguments to pass to the method
* @return bool Whether or not the validation rule passed
*/
public function __call(string $method, array $arguments)
{
$method = $this->_reflection->getMethod($method);
$argumentList = $method->getParameters();
if (array_pop($argumentList)->getName() !== 'context') {
$arguments = array_slice($arguments, 0, -1);
}
$object = is_string($this->_class) ? null : $this->_class;
return $method->invokeArgs($object, $arguments);
}
}