Static Public Member Functions | |
static | sanitizeDataByDesignerTypeForSavingModel ($model, $data) |
static | sanitizeDataToJustHavingElementForSavingModel ($sanitizedData, $elementName) |
static | removeElementFromDataForSavingModel ($sanitizedData, $elementName) |
static | purifyHtml ($text) |
static | purifyHtmlAndModifyInput (&$item) |
Static Protected Member Functions | |
static | isNotMarkedSkipped ($attributeName) |
Static Protected Attributes | |
static | $skippedAttributes = array() |
Helper class for handling data.
Definition at line 40 of file DataUtil.php.
static sanitizeDataByDesignerTypeForSavingModel | ( | $ | model, | |
$ | data | |||
) | [static] |
Sanitizes data for date and date time attributes by converting them to the proper format and timezone for saving.
Definition at line 49 of file DataUtil.php.
static sanitizeDataToJustHavingElementForSavingModel | ( | $ | sanitizedData, | |
$ | elementName | |||
) | [static] |
Given an array of data, filter out all elements but the specified element and return array. If the specified element does not exist, then return null.
array | $sanitizedData | |
string | $elementName |
Definition at line 133 of file DataUtil.php.
static removeElementFromDataForSavingModel | ( | $ | sanitizedData, | |
$ | elementName | |||
) | [static] |
Given an array of data, filter out the specified element from the data if it exists.
array | $sanitizedData | |
string | $elementName |
Definition at line 149 of file DataUtil.php.
static purifyHtml | ( | $ | text | ) | [static] |
Purify string content
string | $text |
Definition at line 165 of file DataUtil.php.
static purifyHtmlAndModifyInput | ( | &$ | item | ) | [static] |
Purify string content This function should be used in recurcive functions, like array_walk_recursive(). It doesn't return data, but instead modify input argument, so use it carefully. As side effect it modify provided element
mixed | $item |
Definition at line 198 of file DataUtil.php.