stylesheets as $css) if ($css === $url) return; $this->stylesheets []= $url; } public function addScript(string $url, bool $defer = false) { foreach ($this->scripts as &$script) { if ($script[0] === $url) { if (!$defer && $script[1]) $script[1] = false; // upgrade from defered to immediate script return; } } $this->scripts []= [ $url, $defer ]; } public function setForced404(string $err) { $this->force_404 = true; $this->force_404_message = $err; } }