config->assetVersion; $this->styles[] = [ 'href' => $href, 'priority' => $priority, 'version' => $version, ]; } public function addScript(string $src, string $pos = 'footer', bool $defer = true, bool $async = false, ?string $version = null): void { $version ??= $this->config->assetVersion; $row = [ 'src' => $src, 'defer' => $defer, 'async' => $async, 'version' => $version, ]; if ($pos === 'header') { $this->scriptsHeader[] = $row; } else { $this->scriptsFooter[] = $row; } } public function styles(): array { return $this->styles; } public function headerScripts(): array { return $this->scriptsHeader; } public function footerScripts(): array { return $this->scriptsFooter; } }