+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Utils_Type {
const
FORTYFIVE = 45,
HUGE = 45;
+ /**
+ * Maximum size of a MySQL BLOB or TEXT column in bytes.
+ */
+ const BLOB_SIZE = 65535;
+
+ /**
+ * Maximum value of a MySQL signed INT column.
+ */
+ const INT_MAX = 2147483647;
+
/**
* Gets the string representation for a data type.
*
'MysqlOrderBy',
'ExtensionKey',
'Json',
+ 'Alphanumeric',
);
if (!in_array($type, $possibleTypes)) {
if ($isThrowException) {
return $data;
}
break;
+
+ case 'Alphanumeric':
+ if (CRM_Utils_Rule::alphanumeric($data)) {
+ return $data;
+ }
+ break;
}
if ($abort) {