isActualFile($staticFilePath = $sitePath.'/web/'.$uri)) { return $staticFilePath; } elseif ($this->isActualFile($staticFilePath = $sitePath.'/public/'.$uri)) { return $staticFilePath; } return false; } /** * Get the fully resolved path to the application's front controller. */ public function frontControllerPath(string $sitePath, string $siteName, string $uri): ?string { $frontControllerPath = null; if (file_exists($path = $sitePath.'/web/app_dev.php')) { $frontControllerPath = $path; } elseif (file_exists($path = $sitePath.'/web/app.php')) { $frontControllerPath = $path; } elseif (file_exists($path = $sitePath.'/public/index.php')) { $frontControllerPath = $path; } $_SERVER['SCRIPT_FILENAME'] = $frontControllerPath; return $frontControllerPath; } }