initFromRequest(); $pie->toSvg(); } elseif ($path === 'png/chart.php') { if (!array_key_exists('data', $_GET)) { return false; } include __DIR__ . '/EmbeddedWeb.php'; EmbeddedWeb::start(); header('Content-Type: image/png'); $pie = new PieChart(); $pie->initFromRequest(); $pie->toPng(); } elseif (substr($path, 0, 4) === 'lib/') { include_once __DIR__ . '/StaticWeb.php'; $app = StaticWeb::start(); (new StaticController())->handle($app->getRequest()); $app->getResponse()->sendResponse(); } elseif (file_exists($baseDir . '/' . $path) && is_file($baseDir . '/' . $path)) { return false; } else { include __DIR__ . '/Web.php'; Web::start()->dispatch(); }