Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

HandlerFactory.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Bundle\EzPublishIOBundle\ApiLoader;
8
9 use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
10 use Symfony\Component\DependencyInjection\ContainerAwareInterface;
11 use Symfony\Component\DependencyInjection\ContainerAwareTrait;
12
16 class HandlerFactory implements ContainerAwareInterface
17 {
18 use ContainerAwareTrait;
19
25 private $handlersMap = [];
26
27 public function setHandlersMap($handlersMap)
28 {
29 $this->handlersMap = $handlersMap;
30 }
31
39 public function getConfiguredHandler($handlerName)
40 {
41 if (!isset($this->handlersMap[$handlerName])) {
42 throw new InvalidConfigurationException("Unknown handler $handlerName");
43 }
44
45 return $this->container->get($this->handlersMap[$handlerName]);
46 }
47 }
eZ\Bundle\EzPublishIOBundle\ApiLoader\HandlerFactory
Factory of IO handlers, given an alias.
Definition: HandlerFactory.php:17
eZ\Bundle\EzPublishIOBundle\ApiLoader\HandlerFactory\setHandlersMap
setHandlersMap($handlersMap)
Definition: HandlerFactory.php:27
eZ\Bundle\EzPublishIOBundle\ApiLoader\HandlerFactory\$handlersMap
$handlersMap
Definition: HandlerFactory.php:25
eZ\Bundle\EzPublishIOBundle\ApiLoader\HandlerFactory\getConfiguredHandler
getConfiguredHandler($handlerName)
Definition: HandlerFactory.php:39
eZ\Bundle\EzPublishIOBundle\ApiLoader
Definition: HandlerFactory.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.