CRM_Utils_Type
class CRM_Utils_Type
Constants
T_INT |
|
T_STRING |
|
T_ENUM |
|
T_DATE |
|
T_TIME |
|
T_BOOLEAN |
|
T_TEXT |
|
T_LONGTEXT |
|
T_BLOB |
|
T_TIMESTAMP |
|
T_FLOAT |
|
T_MONEY |
|
T_EMAIL |
|
T_URL |
|
T_CCNUM |
|
T_MEDIUMBLOB |
|
TWO |
|
FOUR |
|
SIX |
|
EIGHT |
|
TWELVE |
|
SIXTEEN |
|
TWENTY |
|
MEDIUM |
|
THIRTY |
|
BIG |
|
FORTYFIVE |
|
HUGE |
|
BLOB_SIZE |
Maximum size of a MySQL BLOB or TEXT column in bytes. |
INT_MAX |
Maximum value of a MySQL signed INT column. |
Methods
Gets the string representation for a data type.
No description
Get the data_type for the field.
Helper function to call escape on arrays.
Helper function to call validate on arrays
Verify that a variable is of a given type, and apply a bit of processing.
Verify that a variable is of a given type.
Preg_replace_callback for mysqlOrderByFieldFunction escape.
preg_replace_callback for MysqlOrderBy escape.
Get list of avaliable Data Types for Option Groups
Details
at line 89
static string
typeToString(int $type)
Gets the string representation for a data type.
at line 160
static array
getValidTypes()
at line 186
static string
getDataTypeFromFieldMetadata(array $fieldMetadata)
Get the data_type for the field.
at line 205
static
escapeAll($data, $type, $abort = TRUE)
Helper function to call escape on arrays.
at line 217
static
validateAll($data, $type, $abort = TRUE)
Helper function to call validate on arrays
at line 238
static mixed
escape(mixed $data, string $type, bool $abort = TRUE)
Verify that a variable is of a given type, and apply a bit of processing.
at line 379
static mixed
validate(mixed $data, string $type, bool $abort = TRUE, string $name = 'One of parameters ', bool $isThrowException = TRUE)
Verify that a variable is of a given type.
at line 503
static string
mysqlOrderByFieldFunctionCallback(string $clause)
Preg_replace_callback for mysqlOrderByFieldFunction escape.
Add backticks around the field name.
at line 510
static
mysqlOrderByCallback($matches)
preg_replace_callback for MysqlOrderBy escape.
at line 537
static array
dataTypes()
Get list of avaliable Data Types for Option Groups