Get and register render.

@param string $render
@param string $ns
@return mixed
199842
public static function _($render, $ns = __NAMESPACE__)
    {
        $html   = self::getInstance();
        $render = Str::low($render);
        $alias  = $ns . '\\' . $render;

        if (!isset($html[$alias])) {
            $html[$alias] = self::_register($render, $ns);
        }

        return $html[$alias];
    }
1305798
public function render(array $arguments = [], $renderer = null) {
        $this->runDynamicCallbacks($arguments);

        return $this->baseRender($arguments, $renderer);
    }
1311254
public static function pushRenderer( $renderer )
    {
        if (! in_array( 'Altamira\ChartRenderer\RendererInterface', class_implements( $renderer ) ) ) {
            throw new \UnexpectedValueException( "Renderer must be instance of or string name of a class implementing RendererInterface" );
        }

        array_push( self::$rendererChain, $renderer );
        
        return self::getInstance();
    }
204192
public function setRender(INabuHTTPResponseRender $render = null)
    {
        if ($render instanceof INabuHTTPResponseRender) {
            $this->render = $render;
        } elseif ($render === null) {
            $this->render = null;
        } else {
            throw new ENabuCoreException(
                ENabuCoreException::ERROR_METHOD_PARAMETER_IS_EMPTY,
                array('setRender', '$render')
            );
        }
    }
21717
public function render(ResultsRenderer $renderer)
    {
        $output = '';
        if ($this->result->headersDifferent()) {
            $output .= sprintf(
                "%s      %s\n%s  %s",
                $renderer->style('YOUR HEADERS:', ['bold', 'yellow']),
                $this->headers($this->result->getActualHeaders(), $renderer),
                $renderer->style('EXPECTED HEADERS:', ['bold', 'yellow']),
                $this->headers($this->result->getExpectedHeaders(), $renderer, false)
            );
        }

        if ($this->result->bodyDifferent()) {
            if ($this->result->headersAndBodyDifferent()) {
                $output .= "\n" . $renderer->style('- - - - - - - - -', ['default', 'bold']) . "\n\n";
            }

            $output .= sprintf(
                "%s       %s\n\n%s   %s\n",
                $renderer->style('YOUR OUTPUT:', ['bold', 'yellow']),
                $renderer->style(sprintf('"%s"', $this->result->getActualOutput()), 'red'),
                $renderer->style('EXPECTED OUTPUT:', ['bold', 'yellow']),
                $renderer->style(sprintf('"%s"', $this->result->getExpectedOutput()), 'green')
            );
        }

        return $output;
    }
1025855
function render()
    {
        $Template = $this->getTemplate();
        if ($Template === null)
            // Nothing To Render!!
            return null;

        if (! is_file($Template) )
        {
            ## resolve to template file path from name
            $_t_template = $this->resolver()->resolve($Template);

            ## only if file resolved
            ($_t_template === false) ?: $Template = $_t_template;

            ##! Note:
            ##- if file not resolved let it handle within renderer
            ##- ..
        }

        ## Render Into Variable:
        $vars = \Poirot\Std\cast($this->variables())->toArray();
        $renderer = $this->renderer();

        // !! If Template not resolved also let renderer to resolve into template path.

        ErrorStack::handleError(); // handle errors --------------------\
        #
        if (is_callable($renderer))
            $result = call_user_func($renderer, $Template, $vars);
        else
            ### its renderer instance
            $result = $renderer->capture($Template, $vars);
        #
        if ($ex = ErrorStack::handleDone()) throw $ex; // --------------/


        return $result;
    }
285301
public function block($code, $render = false, array $attrs = array()) {
        return $this->_storeOrRender(
            'block',
            array(
                'value' => $code,
                'render' => $render,
                'attrs' => $attrs
            )
        );
    }
412750
public function row($name, RendererInterface $renderer = null)
    {
        $renderer = $renderer ?: $this->getDefaultRenderer();

        return $this->getRow($name)->render($renderer);
    }
498756
public function register(Renderer $renderer) {
        $this->registerTokenRenderer(StrikethroughRule::NAME . StrikethroughRule::OPEN, 'renderOpen', $renderer);
        $this->registerTokenRenderer(StrikethroughRule::NAME . StrikethroughRule::CLOSE, 'renderClose', $renderer);

    }
399220
public function register(Renderer $renderer) {
        $this->registerTokenRenderer(TableRule::NAME . TableRule::OPEN, 'renderOpen', $renderer);
        $this->registerTokenRenderer(TableRule::NAME . TableRule::CLOSE, 'renderClose', $renderer);
        $this->registerTokenRenderer(TableRule::NAME . '_HEADER_OPEN', 'renderHeaderOpen', $renderer);
        $this->registerTokenRenderer(TableRule::NAME . '_HEADER_CLOSE', 'renderHeaderClose', $renderer);
        $this->registerTokenRenderer(TableRule::NAME . '_ROW_OPEN', 'renderRowOpen', $renderer);
        $this->registerTokenRenderer(TableRule::NAME . '_ROW_CLOSE', 'renderRowClose', $renderer);
        $this->registerTokenRenderer(TableRule::NAME . '_HEAD_COLL_OPEN', 'renderHeadCollOpen', $renderer);
        $this->registerTokenRenderer(TableRule::NAME . '_HEAD_COLL_CLOSE', 'renderHeadCollClose', $renderer);
        $this->registerTokenRenderer(TableRule::NAME . '_COLL_OPEN', 'renderCollOpen', $renderer);
        $this->registerTokenRenderer(TableRule::NAME . '_COLL_CLOSE', 'renderCollClose', $renderer);
    }
251230
public function render($renderer)
    {
        $renderer->clearPageHeader();
        foreach ($this->elements as $element) {
            $renderer->addPageHeader($element);
        }
    }
3965
public function render($options = [])
    {
        if ($this->isPerformed()) {
            throw new Exception\DoubleRenderException(
                'Can only render or redirect once per action'
            );
        }
        list ($renderOptions, $options) = $this->splitOptions($options);
        $renderOptions = $this->normalizeRender($renderOptions);
        $this->response()->setBody($this->renderToString($renderOptions, $options));
    }
187423
public function render($render = true)
    {
        if ($render) {
            ob_clean();
            header('Content-Type: application/rss+xml; charset=utf-8');
            echo $this->createXmlDocument();
            flush();
            die();
        }

        return $this->createXmlDocument();
    }
989871
public function register(Renderer $renderer) {
        $this->registerTokenRenderer(CodeRule::NAME . CodeRule::OPEN, 'renderOpen', $renderer);
        $this->registerTokenRenderer(CodeRule::NAME . CodeRule::CLOSE, 'renderClose', $renderer);
        $this->registerTokenRenderer(CodeRule::NAME, 'renderContent', $renderer);

        $this->registerTokenRenderer(CodeAltRule::NAME . CodeAltRule::OPEN, 'renderOpen', $renderer);
        $this->registerTokenRenderer(CodeAltRule::NAME . CodeAltRule::CLOSE, 'renderClose', $renderer);
        $this->registerTokenRenderer(CodeAltRule::NAME, 'renderContent', $renderer);
    }
720130
final function render()
    {
        if ($this->_c__isNowRendering)
            return '';

        $this->_c__isNowRendering = true;


        # Render Bind View Models:
        #
        $makeCopyOfCurrentQueue = clone $this->queue;
        foreach($this->queue as $vc)
        {
            /** @var DecorateViewModel $vc */

            try
            {
                $vc->delegateRenderBy($this, $this->nextRoot);
                // prepare bind view model result into parent model
                $vc->assertRenderResult(
                    $vc_render = $vc->render()
                    , $this
                );

                if ( $vc->isFinal() )
                    $rFinal = (string) $vc_render;
            }
            catch (\Exception $e) {
                ## set render flag to false, render job is done
                $this->_c__isNowRendering = false;
                throw $e;
            }
        }

        $this->queue = $makeCopyOfCurrentQueue;
        $this->_c__isNowRendering = false;


        if ( isset($rFinal) )
            return $rFinal;

        # Then Render Self ...
        ## ... implement on extend classes
        return $this->_view->render();
    }
586866
protected function output($value)
    {
        if ($value instanceof Renderable) {
            $value = $value->render();
        }

        if ($value instanceof Htmlable) {
            $value = $value->toHtml();
        }

        if ($value instanceof Jsonable) {
            $value = $value->toJson();
        }

        if (!is_null($value) && !is_scalar($value)) {
            return sprintf('<pre>%s</pre>', var_export($value, true));
        }

        return $value;
    }
315277
protected function rendererFactory($renderer): RendererInterface
	{
		return $renderer instanceof Closure ? $this->container->call($renderer) : $this->container->get($renderer);
	}