Move View adapter initialization out of Application::run()
Move View adapter initialization out of Application::run()

Vew adapter initialization must be placed in index file. Example:
$accept = filter_input(INPUT_SERVER, HTTP_ACCEPT);
if (false !== strpos($accept, application/json)) {
View::setAdapter(new JsonAdapter);
$route_exception = NotFoundException::class;
} else {
View::setAdapter(new Adapter);
$route_exception = HttpNotFoundException::class;
}

nafigator/Veles