protected _splitAttribute ( string $attr ) : array | ||
$attr | string | The raw attribute value. |
Résultat | array | The attribute hash |
protected function _splitAttribute($attr)
{
$attributes = array();
$pos = strpos($attr, chr(61));
// equals sign
if ($pos) {
$attributes[substr($attr, 0, $pos)] = substr($attr, $pos + 1);
} else {
$attributes[$attr] = null;
}
return $attributes;
}