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

404