DataUtil Class Reference

Inheritance diagram for DataUtil:
GetUtil PostUtil HtmlPostUtil

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()

Detailed Description

Helper class for handling data.

Definition at line 40 of file DataUtil.php.

Member Function Documentation

static sanitizeDataByDesignerTypeForSavingModel ( model,
) [static]

Sanitizes data for date and date time attributes by converting them to the proper format and timezone for saving.

- array sanitized data

Definition at line 49 of file DataUtil.php.

static sanitizeDataToJustHavingElementForSavingModel ( sanitizedData,
) [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,
) [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 199 of file DataUtil.php.

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Jan 20 07:10:51 2020