* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShop\PrestaShop\Core\Hook; use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** * Interface HookDispatcherInterface defines contract for hook dispatcher * Extends EventDispatcherInterface for compatibility with the Event Dispatcher component. */ interface HookDispatcherInterface extends EventDispatcherInterface { /** * Dispatch given hook. * * @param HookInterface $hook */ public function dispatchHook(HookInterface $hook); /** * Dispatch hook with raw parameters. * * @param string $hookName * @param array $hookParameters */ public function dispatchWithParameters($hookName, array $hookParameters = []); /** * Dispatch rendering hook. * * @param HookInterface $hook * * @return RenderedHookInterface */ public function dispatchRendering(HookInterface $hook); /** * Dispatch rendering hook with parameters. * * @param string $hookName * @param array $hookParameters * * @return RenderedHookInterface */ public function dispatchRenderingWithParameters($hookName, array $hookParameters = []); }