MCPcopy Create free account
hub / github.com/taskforcesh/bullmq / getScript

Method getScript

php/src/Scripts.php:72–82  ·  view source on GitHub ↗

* Load a Lua script by name. */

(string $name)

Source from the content-addressed store, hash-verified

70 * Load a Lua script by name.
71 */
72 private function getScript(string $name): string
73 {
74 if (!isset(self::$scriptCache[$name])) {
75 $path = __DIR__ . '/commands/' . $name;
76 if (!file_exists($path)) {
77 throw new \RuntimeException("Script not found: {$name}");
78 }
79 self::$scriptCache[$name] = file_get_contents($path);
80 }
81 return self::$scriptCache[$name];
82 }
83
84 /**
85 * Execute a Lua script.

Callers 2

execScriptMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected