Returns the renderer service for given renderer name.

@param string $name

@throws \RuntimeException

@return object
501191
protected function getRendererService($name)
    {
        if (!isset($this->renderers[$name])) {
            throw new \RuntimeException('The renderer "%s" does not exist.');
        }

        return $this->container->get($this->renderers[$name]);
    }
670616
public static function getInstance(string $name): Base
    {
        if(!isset(static::$handlers[$name]))
        {
            throw new \RuntimeException(sprintf('GetInstance failed, %s is not found', $name));
        }
        return static::$handlers[$name];
    }
1025080
public function getrenderer() {
    if (empty($this->renderer)) {
      $this->renderer = \Drupal::service('renderer');
    }
    return $this->renderer;
  }
1358691
public function getService($name = null)
    {
        $name = $name ?: $this->defaultService;

        if (!$name) {
            throw new \RuntimeException(sprintf(
                'You must configure a default %s service, registered %s services: "%s"',
                $this->serviceType, $this->serviceType,
                implode('", "', array_keys($this->services))
            ));
        }

        if (isset($this->services[$name])) {
            return $this->services[$name];
        }

        $this->assertServiceExists($name);
        $this->services[$name] = $this->container->get($this->serviceMap[$name]);

        return $this->services[$name];
    }
733123
public function getTemplate($name)
    {
        if (!$this->hasTemplate($name)) {
            throw new \RuntimeException("Template with name \"".$name."\" is not exist");
        }

        $filename = $this->templateMap[$name];

        if (!file_exists($filename)) {
            throw new \RuntimeException("Invalid template filename with name \"".$name."\"");
        }

        return $filename;
    }
390731
protected function getResourceType($name)
    {
        if (!isset($this->types[$name])) {
            $template = $this->parser->parse($name);
            if ($template instanceof TemplateReferenceInterface) {
                $this->types[$name] = $template->get('engine');
            }
        }
        if (!isset($this->types[$name])) {
            throw new \RuntimeException("Could not load the given resource.");
        }

        return $this->types[$name];
    }
844831
public function renderPageContainer($name = '')
    {
        $name = $this->prepareContainerName($name);

        /** @var \Zend\View\Renderer\PhpRenderer $view */
        $view = $this->getView();

        return $this->getPageContainerHtmlByName($view->page, $name);
    }
1345611
protected function getClass($name)
    {
        if (empty($this->adapters[$name])) {
            throw new \RuntimeException(sprintf(
                'Adapter "%s" has not been registered',
                $name
            ));
        }

        return $this->adapters[$name];
    }
1211692
public function getFactory($name)
    {
        if (!isset($this->factories[$name])) {
            throw new \RuntimeException(sprintf('No factory registered with name "%s"', $name));
        }

        return $this->factories[$name];
    }
387010
public function render($name) {
		
		$logger = Logger::getInstance();
		
		$logger->addEvent('Rendering ' . $name . ' widget');
		
		$file = $this->scriptPath . $name .'.php';

		// close buffer and parse file
		ob_start();
		$script = require $file;
		$widget = ob_get_clean();

		return $widget;
		
	}
69247
public function getElement(string $name): Element
    {
        if ($this->page_object_factory === null) {
            throw new RuntimeException('[W406] To create elements you need to pass a factory with setPageObjectFactory()');
        }

        return $this->page_object_factory->createElement($name);
    }
1336992
public static function getInstance(string $name): \Swoole\Table
    {
        if(!static::$isInited)
        {
            throw new \RuntimeException('getInstance failed, MemoryTableManager is not initialized');
        }
        if(!isset(static::$tables[$name]))
        {
            throw new \RuntimeException(sprintf('GetInstance failed, %s is not found', $name));
        }
        return static::$tables[$name];
    }
267652
protected function getSubClass($name)
    {
        if ($this->hasSubClass($name)) {
            return $this->subClasses[$name];
        }

        throw new \RuntimeException(sprintf(
            'Unable to find the subclass `%s` for admin `%s`',
            $name,
            \get_class($this)
        ));
    }
288369
public function get($name)
    {
        $instance = self::getInstance();
        if (!$instance->offsetExists($name)) {
            throw new \RuntimeException(sprintf('Class %s Not Found', $name));
        }

        return $instance->offsetGet($name);
    }
583576
public function getModel($name) {
        if(!isset($this->models[$name])){
            throw new RuntimeException(sprintf("The model document name '%s' is not added in chain model '%s'",$name,$this->id));
        }
        $this->models[$name]->setContainer($this->container);
        return $this->models[$name];
    }
441290
public static function getInstance(string $name): \Swoole\Atomic
    {
        if(!static::$isInited)
        {
            throw new \RuntimeException('getInstance failed, AtomicManager is not initialized');
        }
        if(!isset(static::$atomics[$name]))
        {
            throw new \RuntimeException(sprintf('GetInstance failed, %s is not found', $name));
        }
        return static::$atomics[$name];
    }
397511
public function get(string $name)
    {
        if (isset($this->workerClassMap[$name])) {
            return $this->container->get($this->workerClassMap[$name]);
        }
        return $this->container->get($name);
    }