public function getParentDir(array $dirs = [], string $cabin = '') : int { $parent = 0; foreach ($dirs as $dir) { $parent = $this->getDirectoryId($dir, $parent, $cabin); } return $parent; }
/** * Public API entry point for serving a custom page * * @param string $file * @param array $dirs * @return bool */ protected function serveCustomPage(string $file, array $dirs = []) : bool { return $this->serveFile($file, $this->pages->getParentDir($dirs)); }