content = $content; $this->callback = $callback; } /** * 颜色 * @param $value * @return $this */ public function color($value): self { $this->type = $value; return $this; } /** * 大小 * @param string $size * @return $this */ public function size(string $size = ''): self { $this->size = $size; return $this; } /** * @return array */ public function render(): array { return [ 'nodeName' => 'a-tag', 'color' => $this->type, 'size' => $this->size, 'child' => $this->content ]; } }