/** * DEPRECATION WARNING! This method will be removed in the next major point release * * Append data to view * @param array $data */ public function appendData($data) { if (!is_array($data)) { throw new \InvalidArgumentException('Cannot append view data. Expected array argument.'); } $this->data->replace($data); }
/** * Add data to set * * @param Tag[] $tags Key-value array of data to append to this set * * @throws InvalidTagException if a non-Tag item is passed in */ public function replace($tags) { foreach ($tags as $tag) { if (!$tag instanceof Tag) { throw InvalidTagException::build([], ['invalidTag' => $tag]); } } parent::replace($tags); }