public $polygon = '';
public $cursor = '';
public $blinkdelay = 0;
+ public $stats = [];
protected $role = 'button';
continue;
}
}
+ if ($k === 'stats') {
+ $this->stats = static::parseExtras($v);
+ foreach ($this->stats as $k => $v) {
+ if ($v === '$to') {
+ $this->stats[$k] = $this->to;
+ }
+ }
+ continue;
+ }
$this->$k = $v;
}
if ($this->polygon) {
$res .= 'data-polygon="' . e($this->polygon) . '" ';
}
+ if ($this->stats) {
+ $res .= 'data-stats="' . htmlspecialchars(json_encode($this->stats), ENT_QUOTES) . '" ';
+ }
return $res;