/** * @param string $attributes * @return CustomAttributes */ public static function Parse($attributes) { $ca = new CustomAttributes(); if (empty($attributes)) { return $ca; } $pairs = explode('!sep!', $attributes); foreach ($pairs as $pair) { $nv = explode('=', $pair); $ca->Add($nv[0], $nv[1]); } return $ca; }