Returns a handler instance.

@param string $id - Handler ID.

@return HandlerInterface
774497
public function getHandler(string $id)
    {
        if (!isset($this->_handlers[$id])) {
            throw new \RuntimeException('Handler with ID "'.$id.'" is not registered on the logger factory.');
        }

        return $this->_handlers[$id];
    }
134967
public function fetch($id)
    {
        $routeMath = $this->getEvent()->getRouteMatch();
        $workflowManager = $routeMath->getParam('workflowManager', null);

        if (null === $workflowManager || '' === trim($workflowManager)) {
            return new ApiProblemResponse(
                new ApiProblem(400, 'Invalid workflow manager name')
            );
        }

        if (null === $id || '' === trim($id)) {
            return new ApiProblemResponse(
                new ApiProblem(400, 'Invalid workflow name')
            );
        }

        try {
            $serviceLocator = $this->getServiceLocator();

            /** @var WorkflowZF2ModuleOptions $moduleOptions */
            $moduleOptions = $serviceLocator->get(WorkflowZF2ModuleOptions::class);

            /** @var WorkflowInterface $workflow */
            $workflowServiceName = sprintf($moduleOptions->getWorkflowManagerServiceNamePattern(), $workflowManager);
            $workflow = $this->getServiceLocator()->get($workflowServiceName);

            $workflowDescriptor = $workflow->getWorkflowDescriptor($id);
        } catch (\Exception $e) {
            return new ApiProblemResponse(
                new ApiProblem(400, $e->getMessage())
            );
        }




        return $workflowDescriptor;
    }
440522
public static function instance($id = 'datatable')
    {
        $cls = get_called_class();
        if (!isset(self::$instance[$id])) {
            self::$instance[$id] = new $cls($id);
        }

        return self::$instance[$id];
    }
1131656
public function getById(int $id)
    {
        $result = $this->builder->getById($id);

        if (isset($result[0])) {
            return self::instance($result[0]);
        }

        return null;
    }
1169732
public function get($handlerServiceId)
    {
        $handler = $this->container->get($handlerServiceId);

        if (!$handler instanceof CommandHandlerInterface) {
            throw new \InvalidArgumentException('Handler must be instance if ' . CommandHandlerInterface::class);
        }

        return $handler;
    }
411394
public function get($id)
    {
        $mode = $this->params('mode', false);
        $type = $this->params('type', false);
        $endpoint = $this->params('endpoint', false);
        $annee = $this->params('annee', 0);
        $processStateHandler = $this->getProcessStateHandler();
        $process = $processStateHandler->getProcess($mode, $type, $endpoint, $annee);
        if (is_null($process))
            $process = $processStateHandler->getDefaultProcess($mode, $type, $endpoint, $annee);
        $response = $this->getResponse();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $serializer = $this->getSerializer();
        $processJson = $serializer->serialize($process, 'json');
        $response->setContent($processJson);
        
        return $response;
    }
32023
public function getHandler($handler_id)
    {
        $handlers = $this->getHandlers();
        return empty($handlers[$handler_id]) ? array() : $handlers[$handler_id];
    }
1248556
public function get($id = null)
    {

        // Prep the endpoint
        $endpoint = ($id) ? $this->getEndpoint() . "/" . $id : $this->getEndpoint();

        // Get the resource
        $response = $this->client->get($endpoint, $this->prepareParams());

        // Handle response
        return $this->handleResponse(json_decode($response));

    }
867098
protected function handleDomain(&$id) {
		if ($this->idDelimiter === null) {
			return $this->domain;
		}
		
		$delimiterPos = strpos($id, $this->idDelimiter);
		
		if ($delimiterPos === false) {
			return $this->domain;
		}
		
		$domain = substr($id, 0, $delimiterPos);
		$id     = substr($id, $delimiterPos + 1);
		
		return $domain;
	}
446401
public function getChannelById($id)
    {
        return $this->apiCall('channels.info', [
            'channel' => $id,
        ])->then(function (Payload $response) {
            return new Channel($this, $response['channel']);
        });
    }
1197810
public function retrieve($id)
    {
        $this->repository->finder()->pushCriteria(new ByPid($id));
        $patientInterface = $this->repository->find();
        return $this->interfaceToModel($patientInterface);
    }
283645
public function getAction($id)
    {
        $manager = $this->getTaskManager();

        return $this->handleView($this->view($manager->findById($id)));
    }
777921
public function getLogger(string $id)
    {
        if (!isset($this->_loggers[$id])) {
            throw new \RuntimeException('Logger with ID "'.$id.'" is not registered on the logger factory.');
        }

        return $this->_loggers[$id];
    }
1331911
public function get($id)
    {
        if (!$this->has($id)) {
            // a class name.
            if (strpos($id, '\\') && class_exists($id)) {
                /** @noinspection ExceptionsAnnotatingAndHandlingInspection */
                $this->set($id, $id);
            } else {
                throw new \InvalidArgumentException("The service '$id' was not found, has not been registered!");
            }
        }

        return $this->getInstance($id);
    }
617447
private function createInstance($id)
    {
        $schema = $this->getAndValidateServiceSchema($id);

        $reflection = new ReflectionClass($schema['class']);
        $arguments = $schema['arguments'];

        if ($factoryMethod = $this->getAndValidateFactoryMethod($reflection, $schema)) {
            return $factoryMethod->invokeArgs(null, $arguments);
        }

        return $reflection->newInstanceArgs($arguments);
    }
457027
public function getMessage($id)
    {
        $header = $this->_protocol->top($id);
        $message = $this->_protocol->retrieve($id);

        return new Message($header, $message, $id);
    }
1149784
public function &getAssetHandler(string $id)
    {
        if (empty($this->handler[$id])) {
            Throw new AssetManagerException(sprintf('There is no registered "%s" asset handler.', $id));
        }

        return $this->handler[$id];
    }