handlerPool = $handlerPool; } /** * @param array $handlerNames * @return HandlerInterface[] */ public function process(array $handlerNames) { $handlerObjects = []; foreach ($handlerNames as $name => $className) { $handlerObjects[$name] = $this->handlerPool->get($className); } return $handlerObjects; } }