private readonly ?ScriptController
$scriptController ) { } public function factory(Hook
$hook, Script
$script): ScriptResponseFactoryFacade
{ $salesChannelContext = null;
if ($hook instanceof SalesChannelContextAware
) { $salesChannelContext =
$hook->
getSalesChannelContext();
} return new ScriptResponseFactoryFacade( $this->router,
$this->scriptController,
$salesChannelContext );
} public function getName(): string
{ return 'response';
}}