| 1 | <?php |
||
| 7 | final class PropertyBuilder |
||
| 8 | { |
||
| 9 | /** @var \Spatie\IcalendarGenerator\PropertyTypes\PropertyType */ |
||
| 10 | private $property; |
||
| 11 | |||
| 12 | public function __construct(PropertyType $property) |
||
| 16 | |||
| 17 | public function build(): array |
||
| 18 | { |
||
| 19 | $parameters = $this->resolveParameters(); |
||
| 20 | |||
| 21 | $value = $this->property->getValue(); |
||
| 22 | |||
| 23 | return array_map(function (string $name) use ($value, $parameters) { |
||
| 24 | return "{$name}{$parameters}:{$value}"; |
||
| 25 | }, $this->property->getNames()); |
||
| 26 | } |
||
| 27 | |||
| 28 | private function resolveParameters(): string |
||
| 42 | } |
||
| 43 |