2 Commits
3.x ... 4.x

Author SHA1 Message Date
User
74a8b51047 20250514#1 2025-05-14 13:52:00 +03:00
User
1e8457567a 20250302#6 2025-03-02 21:51:53 +03:00
3 changed files with 15 additions and 4 deletions

View File

@@ -10,12 +10,12 @@ Stable version
composer require rmphp/content
```
```bash
composer require rmphp/content:"^3.0"
composer require rmphp/content:"^4.0"
```
Dev version contains the latest changes
```bash
composer require rmphp/content:"3.x-dev"
composer require rmphp/content:"4.x-dev"
```

View File

@@ -9,7 +9,7 @@
],
"require": {
"php": "^8.1",
"rmphp/foundation": "^2.0"
"rmphp/foundation": "^3.0"
},
"autoload": {
"psr-4": {

View File

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