_data = collect(); } public function __get($key) { return $this->_data->get($key); } public function __set(string $key,$value) { return $this->_data->put($key,$value); } public function count() { return $this->_data->count(); } public function jsonSerialize() { return $this->_data; } protected function validate(string $key,$value) { if (Arr::get(static::LIMITS,$key) && (strlen($value) > static::LIMITS[$key])) throw new SlackSyntaxException(sprintf('%s must be %d chars or less for buttons %s',$key,static::LIMITS[$key],get_class($this))); return $value; } }