filename = "html/$key.html"; if (!is_file($this->filename) || !is_readable($this->filename)) { throw new \ErrorException(\sprintf(self::FILE_NOT_FOUND, $this->filename)); } } /* Display the index page. */ public function index($data = null) { readfile($this->filename); } }