drupflare/worker - v1.0.4
    Preparing search index...

    Variable OPS_RUN_PHPConst

    OPS_RUN_PHP: "\nuse Drupal\\Core\\DrupalKernel;\nuse Drupal\\Core\\Site\\Settings;\nuse Drupal\\drupflare\\Ops\\OpsRunner;\nuse Symfony\\Component\\HttpFoundation\\Request;\n\n// __CFW_FIBER_SHIM__\nchdir('/drupal');\n\n$out = ['ok' => false];\n$clock = function () {\n\treturn microtime(true) * 1000;\n};\n$t0 = $clock();\n$req = json_decode(__CFW_REQUEST__, true);\n\ntry {\n\tif (!isset($GLOBALS['__pw_autoloader']) || !is_object($GLOBALS['__pw_autoloader'])) {\n\t\t$GLOBALS['__pw_autoloader'] = require '/drupal/autoload.php';\n\t}\n\t$autoloader = $GLOBALS['__pw_autoloader'];\n\n\tif (!isset($GLOBALS['__pw_kernel'])) {\n\t\t$request = Request::create('/', 'GET');\n\t\t$kernel = new DrupalKernel('prod', $autoloader);\n\t\tDrupalKernel::bootEnvironment();\n\t\t$sitePath = DrupalKernel::findSitePath($request);\n\t\t$kernel->setSitePath($sitePath);\n\t\tSettings::initialize('/drupal', $sitePath, $autoloader);\n\t\t$kernel->boot();\n\t\t$GLOBALS['__pw_kernel'] = $kernel;\n\t}\n\t// several operations reach a service that reads the current request; a fragment pushes none\n\tif (Drupal::hasContainer()) {\n\t\tDrupal::service('request_stack')->push(Request::create('/', 'GET'));\n\t}\n\n\t$path = '/drupal/modules/custom/drupflare/src/Ops/OpsRunner.php';\n\tif (!class_exists(OpsRunner::class, false) && is_file($path)) {\n\t\trequire_once $path;\n\t}\n\t$cls = OpsRunner::class;\n\tif (!class_exists($cls)) {\n\t\t$out['error'] = 'OpsRunner is not in the mount';\n\t} else {\n\t\t$out = $cls::run(\n\t\t\t(string) ($req['name'] ?? ''),\n\t\t\t(array) ($req['args'] ?? []),\n\t\t\t(array) ($req['options'] ?? []),\n\t\t);\n\t}\n} catch (Throwable $e) {\n\t$out['ok'] = false;\n\t$out['error'] = get_class($e) . ': ' . $e->getMessage();\n}\n\n$out['ms'] = round($clock() - $t0, 2);\necho json_encode($out);\n"