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)), function (string $item) { return substr($item, 0, 1) !== "."; }); $this->valid = true; } } } public function file_path(string $file): string { return $this->dir . $file; } } ?> files as $file): ?> = VV::embed(ICONS_DIR . "languages/" . $file) ?> = substr($file, 0, strlen($file) - 4) ?> files as $file): ?> = VV::include($HTMLCodeDemoElement->file_path($file)) ?>
= substr($file, 0, strlen($file) - 4) ?>