namespace = array_key_exists("id", $_GET) ? $_GET["id"] : null; if ($this->namespace) { $this->dir = "snippets/HTMLCodeDemoElement/{$this->namespace}/"; if (is_dir(VV::root($this->dir))) { // Strip "." and ".." $this->files = array_filter(scandir(VV::root($this->dir), SCANDIR_SORT_DESCENDING), function (string $item) { return substr($item, 0, 1) !== "."; }); $this->valid = true; } } } public static function name(string $file): string { return substr($file, 0, strlen($file) - 4); } public static function language(string $file): string { return explode(".", $file, 3)[1]; } public function file_path(string $file): string { return $this->dir . $file; } } ?> valid): ?> files as $file): ?> = VV::embed(ICONS_DIR . "languages/{$HTMLCodeDemoElement::language($file)}.svg") ?> = substr($file, 0, strlen($file) - 4) ?> files as $file): ?> = VV::include($HTMLCodeDemoElement->file_path($file)) ?> Not Found 404
= substr($file, 0, strlen($file) - 4) ?>
Not Found
404