22declare(strict_types=1);
26use
function array_filter;
30 private array $attributes = [];
32 public function add(
Attribute $attribute) :
void{
33 $this->attributes[$attribute->getId()] = $attribute;
36 public function get(
string $id) : ?
Attribute{
37 return $this->attributes[$id] ??
null;
44 return $this->attributes;
51 return array_filter($this->attributes, function(
Attribute $attribute) : bool{
52 return $attribute->isSyncable() && $attribute->isDesynchronized();