Total Complexity | 3 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php declare(strict_types=1); |
||
12 | class BlueskyHelper extends AbstractConfigurableHostHelper |
||
13 | { |
||
14 | protected Builder $builder; |
||
15 | |||
16 | public function addHosts(array $hosts): void |
||
17 | { |
||
18 | parent::addHosts($hosts); |
||
19 | |||
20 | if (!isset($this->builder)) |
||
21 | { |
||
22 | $this->builder = new Builder; |
||
23 | } |
||
24 | |||
25 | $siteId = $this->getSiteId(); |
||
26 | $hosts = $this->getHosts(); |
||
27 | |||
28 | $this->configurator->tags[$siteId]->attributes['embedder']->filterChain[0]->setRegexp( |
||
29 | '/^(?:[-\w]*\.)*' . $this->builder->build($hosts) . '$/' |
||
30 | ); |
||
31 | } |
||
32 | |||
33 | protected function getSiteId(): string |
||
36 | } |
||
37 | } |