An attribute expression is an attribute name prefixed and/or suffixed with array indexes.
It is mainly used in tabular data input and/or input of array type. Below are some examples:
- [0]content is used in tabular data input to represent the "content" attribute
for the first model in tabular input;
- dates[0] represents the first array element of the "dates" attribute;
- [0]dates[0] represents the first array element of the "dates" attribute
for the first model in tabular input.
If $attribute has neither prefix nor suffix, it will be returned back without change.
public static getAttributeName ( string $attribute ) : string | ||
$attribute | string | the attribute name or expression |
리턴 | string | the attribute name without prefix and suffix. |