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): ?>
files as $file): ?>
file_path($file)) ?>