/** ALLWAYS call this method before including a class
* by name from a request parameter, unless you use
* this-> useClass or this-> tryUseClass
* @param String $value the value to check
* @return the value that was passed or trigger an error if not alphanumeric
* _ and - are allowed because of formKey paths
*/
function ($value) {
if ($value && preg_match("'[^A-Za-z0-9_\-]'", $value))
throw new PntValidationException("Non alphanumerical characters in propertyname, type, handler or skinName: $value", E_USER_ERROR);
else
return $value;
}
|