bindTo(null, null)(); } if (!\class_exists($className)) { throw new \Error(\sprintf("Invalid environment class name '%s'", $className)); } if (!\is_subclass_of($className, Environment::class)) { throw new \Error(\sprintf("The class '%s' does not implement '%s'", $className, Environment::class)); } $environment = new $className; if (!\defined("AMP_WORKER")) { \define("AMP_WORKER", \AMP_CONTEXT); } $runner = new TaskRunner($channel, $environment); return $runner->run(); }, $envClassName, $bootstrapPath)); } }