* @license GPL2 or any later version */ class LinkElement extends WidgetElement implements ArrayAccess { use AttributesArrayAccessTrait; /** * Create link by parsing a html chunk. * * @param String $html HTML chunk to parse * @param Icon $icon Optional icon * @return LinkElement Link element from parsed html * @throws Exception if html can not be parsed */ public static function fromHTML($html, ?\Icon $icon = null) { $matched = preg_match('~((?:\s+\w+=".*?")+)>\s*(?P