' . "\n"; } static function insertJS(string $name, bool $module = false): string { return '' . "\n"; } static function versionedFileURL(string $type, string $filename, ?string $custom_path = null): string { $path = $custom_path ?? 'public/' . $type . '/' . $filename . '.' . $type; // si custom_path, $type et $filename ne servent à rien if(file_exists(getcwd() . '/' . $path)){ $version = substr(md5_file($path), 0, 8); return $path . '?v=' . $version; } return $path; // sécurité fichier absent } }