function addFromArray($assets) {
        if (!is_array($assets)) $assets = [$assets];
        foreach ($assets as $key => $asset) {
            if ($key === 'debug') {
                if (self::$debug) $this->addFromArray($asset);
            } else if ($key === 'prod') {
                if (!self::$debug) $this->addFromArray($asset);
            } else {
                if (isset(self::$libs[$asset])) {
                    $this->addLib($asset);
                } elseif (substr($asset, -4) == '.css' || strpos($asset,'.css?v=') !== false) {
                    $this->addCss($asset);
                } else {
                    $this->addJs($asset);
                }
            }
        }
    }