public static function create(array $attributes) { $attributeSet = new AttributeSet(); foreach ($attributes as $attribute) { $attributeSet->initializeWith($attribute); } return $attributeSet; }