@inheritdoc

@param string $name

@return Signal

@throws ResourceNotFoundException
543225
public function getSignal($name)
    {
        if (!isset($this->signals[$name])) {
            throw new ResourceNotFoundException("Signal $name not found");
        }

        return $this->signals[$name];
    }
144256
public function create(string $name): Channel
    {
        if (!array_has($this->channels, $name)) {
            throw new ChannelNotFound('Channel `'.$name.'` not found.');
        }

        $parameters = $this->channels[$name];

        // Create driver and initialize it with channel parameters
        $driver = $this->createDriver($parameters['driver']);
        $driver->initialize(collect($parameters)->except('driver'));

        return new Channel($name, $driver, $parameters['webhook-secret'] ?? null);
    }
1289243
public static function create($name)
    {
        $logger = new Logger($name);

        $localLogConfig = config('logger.local_log');
        if($localLogConfig['enabled'] && !in_array($name, $localLogConfig['exclude_names'])) {
            $streamHandler = self::streamHandler($name);
            $logger->pushHandler($streamHandler);
        }

        $logstashConfig = config('logger.logstash');
        if($logstashConfig['enabled'] && !in_array($name, $logstashConfig['exclude_names'])){
            $gelfHandler = self::logStashHandler($logstashConfig);
            $logger->pushHandler($gelfHandler);
        }

        $requestId = Request::header('x-request-id');
        $logger->setRequestId($requestId);

        return $logger;
    }
924551
protected function service($name) {

		if(false === is_string($name)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($name)), E_USER_ERROR);
		}

		if(true === ServiceContainer :: has($name)) {
			return ServiceContainer :: get($name);
		}

		$function = Application :: get(['services', $name], false);

		if('object' === gettype($function)) {
			
			$func = $function();

			ServiceContainer :: add($name, $func);
			return $func;
		}

		return trigger_error(sprintf('Argument 1 "%s" passed to %s() is not a known service', $name, __METHOD__), E_USER_ERROR);
	}
566659
public function getParameter($name)
    {
        if (!$name || !array_key_exists($name, $this->parameters)) {
            throw new ParameterNotFoundException($name);
        }
        return $this->parameters[$name];
    }
1303233
public function get(Name $name)
    {
        if (!$this->arguments->contains((string) $name)) {
            throw new ArgumentNotDefined((string) $name);
        }

        if (!$this->values->contains((string) $name)) {
            throw new ArgumentNotProvided($this->arguments->get((string) $name));
        }

        return $this->values->get((string) $name);
    }
1143796
public function getSourceContext($name): Source
    {
        $code = $this->getSource($name);
        $path = $this->getFilename($name);

        return new Source($code, $name, $path);
    }
730155
public function getPushHandler($name)
    {
        if (!$this->hasPushHandler($name)) {
            throw new \InvalidArgumentException(sprintf('A push handler named "%s" has not been registered.', $name));
        }

        return $this->pushHandlers[$name];
    }
334403
public function getReceiver(string $name)
    {
        $classPath = explode('\\', get_called_class());
        $class     = (string)$this->getApi()
                                  ->sprintf(':namespace\:class\:method', __NAMESPACE__, end($classPath), $name);

        if (class_exists($class)) {
            return new $class($this);
        }

        return null;
    }
254611
final public function get(string $name)
    {
        $service_selected = null;
        foreach ($this->services as $one => $val) {
            if ($val['name'] === $name) {
                if (!in_array($val['content']->status, array("enabled", "disabled"))) {
                    throw new Server500(new \ArrayObject(array("explain" =>
                        "Undefined status [ ".$val['content']->status." ] for ".$val['name']." service",
                        "solution" => "Please set the status [disabled] or [enabled]")));
                }
                if ($val['content']->status == "disabled") {
                    throw new Server500(new \ArrayObject(array("explain" =>
                        "The service [ ".$val['name']." ] is currently disabled ",
                        "solution" => "Please set the status [enabled] to enable the service")));
                }
                $i = $val['content']->namespace;
                $container = FrameworkContainer::getInstance();
                return ($container->get($i));
            }
        }

        throw new Server500(new \ArrayObject(array("explain" =>
            "Undefined service : $name", "solution" => "Please register the [$name] service")));
    }
588532
public function get($name)
    {
        $names = explode(self::SEPARATOR, $name);
        $method = array_pop($names);
        if ($names) {
            $class_name = 'Task\\' . join('\\', array_map('ucfirst', $names)) . 'TaskList';
        } else {
            $class_name = 'Task\\TaskList';
        }
        $class_path = $this->loader->getPathByClass($class_name, false);
        if ($class_path === null || ! $class_path->isExists()) throw new NotFoundException("No such task. -> {$name}");

        require_once $class_path;
        $class_name = $class_path->getClassName();
        $taskList = new $class_name();
        $taskList->setOutput($this->output);
        $taskList->setContainer($this->raikiri());
        if (! $taskList->has($method)) throw new NotImplementsException("No such task. -> {$name}");

        return $taskList->get($method);
    }
292634
public static function RoutesMiddleware($name)
    {
        if (!self::existsRoutesMiddleware($name)) {
            throw new MiddlewareNotFoundException($name);
        }
        $middleware = self::allRoutesMiddleware();

        return array_get($middleware, $name);
    }
45126
private function getFilter($name)
    {
        if (!$this->hasFilter($name)) {
            throw new FilterNotFoundException($name);
        }

        return $this->filters[$name];
    }
406215
protected function createResourceInstance($name)
    {
        $classname = '\\Habrahabr\\Api\\Resources\\' . $name;

        if (!class_exists($classname)) {
            throw new ResourceNotExistsException($name);
        }

        $resource = new $classname();
        $resource->setAdapter($this->adapter);

        return $resource;
    }
525042
public static function factory($prefix, $name = null)
    {
        $calledClass = get_called_class();

        /** @var \PhalconRest\Api\ApiResource $resource */
        $resource = new $calledClass($prefix);

        if (!$resource->getItemKey()) {
            $resource->itemKey('items');
        }

        if (!$resource->getCollectionKey()) {
            $resource->collectionKey('items');
        }

        if (!$resource->getTransformer()) {
            $resource->transformer(ModelTransformer::class);
        }

        if (!$resource->getHandler()) {
            $resource->setHandler(CrudResourceController::class);
        }

        if (!$resource->getName() && $name) {
            $resource->name($name);
        }

        if ($name) {
            $resource->name($name);
        }

        return $resource;
    }
1370588
public function resolve($name)
        {
            if (!isset(self::$resources[$name])) {
                throw new Exception("[$name] is not a known resource.");
            }

            return isAke(self::$resources, $name);
        }
1165350
public function getRoute($name, array $params = null)
    {
        if (!isset($this->routes[ $name ])) {
            throw new RouteNotFoundException('The path does not exist.');
        }

        $route = $this->routes[ $name ];

        $prefix = !$this->isRewrite()
            ? '?'
            : '';

        $path = $route[ 'path' ];

        if (!empty($params) && isset($route[ 'with' ])) {
            foreach ($route[ 'with' ] as $key => $value) {
                if (!preg_match('/^' . $value . '$/', $params[ $key ])) {
                    throw new RouteArgumentException($params[ $key ], $value, $path);
                }
                $path = str_replace($key, $params[ $key ], $path);
            }
        }

        return $this->basePath . $prefix . $path;
    }