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 */