public function __construct($data) { if (is_string($data)) { $data = ['text' => $data]; } parent::__construct($data); }