OXID eShop CE
4.8.11
|
Public Member Functions | |
__construct ($value=null, $type=self::T_TEXT) | |
__isset ($sName) | |
__get ($sName) | |
__toString () | |
convertToFormattedDbDate () | |
convertToPseudoHtml () | |
setValue ($value=null, $type=self::T_TEXT) | |
getRawValue () |
Public Attributes | |
const | T_TEXT = 1 |
const | T_RAW = 2 |
Protected Member Functions | |
_initValue ($value=null, $type=self::T_TEXT) |
Database field description object.
when a value is requested from oxField, it either takes 'value' field or 'rawValue' (depending which one is available). In case 'rawValue' is taken, it is escaped first before returning.
T_RAW and T_TEXT types represent not the assignment logic, but rather a returned value escaping status.
Definition at line 14 of file oxfield.php.
oxField::__construct | ( | $value = null , |
|
$type = self::T_TEXT |
|||
) |
Constructor Initial value assigment is coded here by not calling a function is for performance because oxField is created MANY times and even a function call matters
if T_RAW is used, then it fills $value, because this is the value, that does not need to be escaped and is by definition equal to $rawValue (which is not set for less memory usage).
if T_TEXT is used, then $rawValue is assigned and retrieved $value (which is not set initially) is escaped $rawValue.
e.g.
if your input is "<b>string</b>" and you want your output to be exactly same,
you should use T_RAW - in this way it will be assigned to $value property as the result.
if your input is "1 & (a < b)" and you want your output to be escaped, you
should use T_TEXT - in this way it will be assigned to $rawValue property and it will be escaped.
mixed | $value | Field value |
int | $type | Value type |
Definition at line 51 of file oxfield.php.
oxField::__get | ( | $sName | ) |
Magic getter
string | $sName | Variable name |
Definition at line 94 of file oxfield.php.
oxField::__isset | ( | $sName | ) |
Checks if $name is set
string | $sName | Variable name |
Definition at line 73 of file oxfield.php.
oxField::__toString | ( | ) |
|
protected |
Initial field value
mixed | $value | Field value |
int | $type | Value type |
Definition at line 156 of file oxfield.php.
oxField::convertToFormattedDbDate | ( | ) |
oxField::convertToPseudoHtml | ( | ) |
oxField::getRawValue | ( | ) |
oxField::setValue | ( | $value = null , |
|
$type = self::T_TEXT |
|||
) |
Sets field value and type
mixed | $value | Field value |
int | $type | Value type |
Definition at line 176 of file oxfield.php.
const oxField::T_RAW = 2 |
escaping functionality type: expected value is not escaped (raw) text.
Definition at line 24 of file oxfield.php.
const oxField::T_TEXT = 1 |
escaping functionality type: expected value is escaped text.
Definition at line 19 of file oxfield.php.