/**
* Serve a preset
* @param \stdClass $pld
+ * @return true to continue serving the payload
* @throws Exception
*/
private function servePreset($pld) {
case "LICENSE":
case "VERSION":
$pld->text = file_get_contents(ROOT."/$pld->ref");
- break;
+ return true;
case "index.css":
$this->serveStylesheet();
break;
default:
throw new Exception(404, "$pld->ref not found");
}
+ return false;
}
private function serve() {
/* direct match */
$pld->entry = $repo->getEntry($pld->ref);
}
- } else {
- return $this->servePreset($pld);
+ } elseif (!$this->servePreset($pld)) {
+ return;
}
}