1
0
mirror of https://github.com/Chouchen/ShikiryuRSS.git synced 2025-09-10 02:24:33 +02:00

Finishes Builders

This commit is contained in:
2023-04-13 11:24:43 +02:00
parent a6a31e18e1
commit 317d9e37e8
7 changed files with 326 additions and 32 deletions

View File

@@ -126,7 +126,11 @@ class SRSS implements Iterator
throw new PropertyNotFoundException(Channel::class, $name);
}
if ((new Validator())->isValidValueForObjectProperty($this->channel, $name, $val)) {
$this->channel->{$name} = $val;
if (SRSSTools::getPropertyType(Channel::class, $name) === 'array') {
$this->channel->{$name}[] = $val;
} else {
$this->channel->{$name} = $val;
}
}
}