From 7aa83e3e5f82c04a45e0d8c104ce6e91de94da3b Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Wed, 6 Nov 2019 15:09:54 -0500 Subject: [PATCH] Update $sanitizer->testAll() to make hookable and add a couple more methods to it processwire/processwire-issues#85 --- wire/core/Sanitizer.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/wire/core/Sanitizer.php b/wire/core/Sanitizer.php index 23ec6773..9825b51a 100644 --- a/wire/core/Sanitizer.php +++ b/wire/core/Sanitizer.php @@ -93,9 +93,10 @@ * ProcessWire 3.x, Copyright 2019 by Ryan Cramer * https://processwire.com * - * @link http://processwire.com/api/variables/sanitizer/ Offical $sanitizer API variable Documentation + * @link https://processwire.com/api/variables/sanitizer/ Offical $sanitizer API variable Documentation * * @method array($value, $sanitizer = null, array $options = array()) + * @method array testAll($value) * */ @@ -3710,11 +3711,11 @@ class Sanitizer extends Wire { * * #pw-group-other * - * @param $value + * @param mixed $value * @return array * */ - public function testAll($value) { + public function ___testAll($value) { $sanitizers = array( 'alpha', 'alphanumeric', @@ -3723,6 +3724,8 @@ class Sanitizer extends Wire { 'bit', 'bool', 'camelCase', + 'chars', + 'checkbox', 'date', 'digits', 'email', @@ -3731,8 +3734,10 @@ class Sanitizer extends Wire { 'entities1', 'entitiesMarkdown', 'fieldName', + 'fieldSubfield', 'filename', 'float', + 'httpUrl', 'hyphenCase', 'int', 'intArray',