in src/router/BaseRouter.php [77:105]
protected function getResolver(): IResolver<TResponder> {
if ($this->resolver !== null) {
return $this->resolver;
}
if (is_dev()) {
$routes = null;
} else {
$_success = null;
$routes = \apc_fetch(__FILE__.'/cache', inout $_success);
if ($routes === false) {
$routes = null;
}
}
if ($routes === null) {
$routes = Dict\map(
$this->getRoutes(),
$method_routes ==>
PrefixMatching\PrefixMap::fromFlatMap(dict($method_routes)),
);
if (!is_dev()) {
\apc_store(__FILE__.'/cache', $routes);
}
}
$this->resolver = new PrefixMatchingResolver($routes);
return $this->resolver;
}