From 74a8b51047a5978b5856aa883dcefed7af9f5095 Mon Sep 17 00:00:00 2001 From: User Date: Wed, 14 May 2025 13:52:00 +0300 Subject: [PATCH] 20250514#1 --- src/Content.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Content.php b/src/Content.php index 26f1365..0831a09 100644 --- a/src/Content.php +++ b/src/Content.php @@ -73,6 +73,15 @@ class Content implements TemplateInterface { } } + /** + * @param array $data + * @return void + */ + public function addData(array $data = []) : void { + foreach ($data as $dataKey => $dataVal){ + $this->{$dataKey} = $dataVal; + } + } /** * @inheritDoc @@ -111,6 +120,8 @@ class Content implements TemplateInterface { $this->addSubtemplate($point, $subtemplate, $resource); } + + /** * @inheritDoc */