[ 'displayErrorDetails' => true, 'determineRouteBeforeAppMiddleware' => true ], 'view' => function($container) { #$view_time_start = microtime(true); #$view = new \Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache'); if (!apcu_exists("views")) { apcu_store("views", new \Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache')); } $view = apcu_fetch("views"); #$fp = fopen('/config/data/sql.log', 'a'); #fwrite($fp, "!!!App - view load time : " . round((microtime(true) - $view_time_start),6) . "\n"); #fclose($fp); return $view; }, 'LoginControllerInstance' => function($container) { return new LoginController($container, 'grocy_session'); }, 'UrlManager' => function($container) { if (!apcu_exists("UrlManager")) { apcu_store("UrlManager", new UrlManager(GROCY_BASE_URL)); } return apcu_fetch("UrlManager"); }, 'ApiKeyHeaderName' => function($container) { return 'GROCY-API-KEY'; } ]); #fwrite($fp, "!!!App - Container build time in seconds: " . round((microtime(true) - $app_time_start),6) . "\n"); #$app_build_time_start = microtime(true); $app = new \Slim\App($appContainer); #fwrite($fp, "!!!App - App object build time in seconds: " . round((microtime(true) - $app_time_start),6) . "\n"); #$fp = fopen('/www/data/sql.log', 'a'); #fwrite($fp, "!!!Starting up loading app\n"); #fwrite($fp, "!!!".print_r(ini_get_all(),True)."\n"); #fwrite($fp, "!!!".print_r(opcache_get_status(),True)."\n"); #fclose($fp); #phpinfo(); #$route_load_time_start = microtime(true); // Load routes from separate file require_once __DIR__ . '/routes.php'; #fwrite($fp, "!!!App - Route load time in seconds: " . round((microtime(true) - $route_load_time_start),6) . "\n"); #fwrite($fp, "!!!App - App build time in seconds: " . round((microtime(true) - $app_time_start),6) . "\n"); #$fp = fopen('/config/data/sql.log', 'a'); #fwrite($fp, "!!!App starting run\n"); #$run_time_start = microtime(true); $app->run(); #fwrite($fp, "!!!App - Total run time in seconds: " . round((microtime(true) - $run_time_start),6) . "\n"); #fwrite($fp, "!!!App - Total execution time in seconds: " . round((microtime(true) - $time_start),6) . "\n"); #fwrite($fp, "!!!APP - ini: ".print_r(ini_get_all(),TRUE)."\n"); #fwrite($fp, "!!!APP - opcache status: ".print_r(opcache_get_status(),TRUE)."\n"); #fwrite($fp, "!!!APP - opcache config: ".print_r(opcache_get_configuration(),TRUE)."\n"); #fclose($fp);