@param RendererInterface $r
@param object            $value
@param int               $level
@param bool              $hideHeader
@param string            $class

@return string
180356
private function renderObject(
        RendererInterface $r,
        $value,
        int $level,
        bool $hideHeader = false,
        string $class = ''
    ): string {
        if (!$hideHeader) {
            $type = ($class ?: get_class($value)) . ' object ';

            $header = $r->apply($type, 'type', 'object') . "\n";
            $header .= $r->indent($level) . $r->apply('(', 'syntax', '(') . "\n";
        } else {
            $header = '';
        }

        //Let's use method specifically created for dumping
        if (method_exists($value, '__debugInfo') || $value instanceof \Closure) {
            if ($value instanceof \Closure) {
                $debugInfo = $this->describeClosure($value);
            } else {
                $debugInfo = $value->__debugInfo();
            }

            if (is_array($debugInfo)) {
                //Pretty view
                $debugInfo = (object)$debugInfo;
            }

            if (is_object($debugInfo)) {
                //We are not including syntax elements here
                return $this->renderObject($r, $debugInfo, $level, false, get_class($value));
            }

            return $header
                . $this->renderValue($r, $debugInfo, '', $level + (is_scalar($value)), true)
                . $r->indent($level) . $r->apply(')', 'syntax', ')') . "\n";
        }

        $refection = new \ReflectionObject($value);

        $output = '';
        foreach ($refection->getProperties() as $property) {
            $output .= $this->renderProperty($r, $value, $property, $level);
        }

        //Header, content, footer
        return $header . $output . $r->indent($level) . $r->apply(')', 'syntax', ')') . "\n";
    }
756294
public function src($url, $render = false, array $attrs = array()) {
        return $this->_storeOrRender(
            'src',
            array(
                'value' => $url,
                'render' => $render,
                'attrs' => $attrs
            )
        );
    }
1195088
public function html(PhpRenderer $renderer = null) {
        $view = new View();
        $view->setResponse(new Response());
        $resolver = new TemplateMapResolver();

        if($renderer === null) {
            $renderer = new PhpRenderer();
            $resolver->add($this->getTemplate(), $this->getDefaultTemplatePath($this->getTemplate()));
            $renderer->setResolver($resolver);
        } else {
            $renderer->resolver()->attach($resolver);
        }

        $view->getEventManager()->attach(new PhpRendererStrategy($renderer));

        $view->render($this);

        return $view->getResponse()->getContent();
    }
482807
public function parseRender($value)
    {
        /** @var \Illuminate\Contracts\View\Factory $view */
        $view = app('view');
        $parameters = [];

        if (is_array($value)) {
            $parameters = array_except($value, 0);
            $value = $value[0];
        }

        if (is_callable($value)) {
            return $value($parameters);
        } elseif ($this->isBuiltInRenderFunction($value)) {
            return $value;
        } elseif ($view->exists($value)) {
            return $view->make($value)->with($parameters)->render();
        }

        return $value ? $this->parseRenderAsString($value) : null;
    }
874008
public function renderReturned(
        $subject,
        Cardinality $cardinality,
        ?Matcher $value
    ): string {
        $isCall = $subject instanceof Call;

        if ($isCall) {
            $calls = [$subject];
            $renderedCallee =
                $this->exporter->exportCallable($subject->callback());
        } else {
            $calls = $subject->allCalls();
            $renderedCallee = $this->exporter->exportCallable($subject);
        }

        $renderedSubject = $this->bold . $renderedCallee . $this->reset;

        if ($value) {
            $renderedValue = $value->describe($this->exporter);
        } else {
            $renderedValue = '<any>';
        }

        $renderedCriteria =
            'behave like:' . PHP_EOL .
            '    ' . $this->fail . ' Returned ' . $renderedValue;

        $minimum = $cardinality->minimum();
        $maximum = $cardinality->maximum();
        $isNever = 0 === $maximum;

        if ($isCall) {
            if ($isNever) {
                $expected =
                    'Expected ' . $renderedSubject .
                    ' call #' . $subject->index() .
                    ' not to ' . $renderedCriteria;
            } else {
                $expected =
                    'Expected ' . $renderedSubject .
                    ' call #' . $subject->index() .
                    ' to ' . $renderedCriteria;
            }
        } else {
            if ($isNever) {
                $expected =
                    'Expected ' . $renderedSubject .
                    ' not to ' . $renderedCriteria;
            } elseif ($cardinality->isAlways()) {
                $expected =
                    'Expected all ' . $renderedSubject .
                    ' calls to ' . $renderedCriteria;
            } else {
                $expected =
                    'Expected ' . $renderedSubject .
                    ' to ' . $renderedCriteria;
            }
        }

        $totalCount = count($calls);
        $matchCount = 0;

        if ($totalCount) {
            $renderedCalls = [];

            foreach ($calls as $call) {
                if ($responseEvent = $call->responseEvent()) {
                    list($exception, $returnValue) = $call->response();
                }

                if ($responseEvent instanceof ReturnedEvent) {
                    if ($value) {
                        $isMatch = $value->matches($returnValue);
                    } else {
                        $isMatch = true;
                    }
                } else {
                    $isMatch = false;
                }

                if ($isMatch) {
                    ++$matchCount;
                }

                if ($isMatch xor $isNever) {
                    $renderedResult = $this->pass;
                } else {
                    $renderedResult = $this->fail;
                }

                $renderedArguments = [];

                foreach ($call->arguments()->all() as $argument) {
                    $renderedArguments[] =
                        $this->exporter->export($argument, 0);
                }

                if ($responseEvent instanceof ReturnedEvent) {
                    $renderedReturnValue =
                        $this->exporter->export($returnValue);

                    if (!$isMatch && $value instanceof EqualToMatcher) {
                        $renderedReturnValue = $this->differenceEngine
                            ->difference($renderedValue, $renderedReturnValue);
                    }

                    $renderedResponse = 'Returned ' . $renderedReturnValue;
                } elseif ($responseEvent instanceof ThrewEvent) {
                    $renderedResponse =
                        'Threw ' . $this->exporter->export($exception);
                } else {
                    $renderedResponse = 'Never responded';
                }

                $renderedCalls[] =
                    $renderedResult . ' Call #' . $call->index() .
                    ' - ' . $renderedCallee .
                    '(' . implode(', ', $renderedArguments) . '):' .
                    PHP_EOL . '    ' . $renderedResult .
                    ' ' . $renderedResponse;
            }

            $actual = PHP_EOL . implode(PHP_EOL, $renderedCalls);
        } else {
            $actual = '';
        }

        if ($isCall) {
            $cardinality = '';
        } else {
            $cardinality = $this->renderCardinality(
                $minimum,
                $maximum,
                $matchCount,
                $totalCount,
                $totalCount,
                false
            );
        }

        return $this->reset . $expected . $cardinality . $actual;
    }
1247004
public function filter($value)
    {
        if ($value instanceof VisibilityInterface
            && !$this->builder->isVisibilityAllowed($value->getVisibility())
        ) {
            return null;
        }

        return $value;
    }
193980
public function clickDisplayedElementByClass($value, $timeout = 0)
    {
        return $this->clickDisplayedElement(self::BY_CLASS_NAME, $value, $timeout, $timeout);
    }
638620
public function render($value, $presentation)
    {
        if (is_array($value) && current($value) instanceof Type) {
            return $this->renderType($value, $presentation);
        }

        if (is_array($value) || $value instanceof \Traversable || $value instanceof Collection) {
            return $this->renderASeriesOfLinks($value, $presentation);
        }

        if ($value instanceof CollectionDescriptor) {
            return $this->renderTypeCollection($value, $presentation);
        }

        return $this->renderLink($value, $presentation);
    }
1760
public function renderValue(array $context, $value, array $parameters = [], ?string $viewContext = null): string
    {
        try {
            return $this->renderer->renderValue(
                $value,
                $this->getViewContext($context, $viewContext),
                $parameters
            );
        } catch (Throwable $t) {
            $message = sprintf(
                'Error rendering a value of type "%s"',
                is_object($value) ? get_class($value) : gettype($value)
            );

            $this->errorHandler->handleError($t, $message, ['object' => $value]);
        }

        return '';
    }
260228
public function hidden($name = null, $value = null, $attr = null)
    {
        return $this->createInput('hidden', $name, $value, $attr);
    }
1284249
private function generateTemplateResponse(
        Renderer $renderer,
        ServerRequestInterface $request
    ) : ResponseInterface {
        $response = ($this->responseFactory)()->withStatus(StatusCodeInterface::STATUS_NOT_FOUND);
        $response->getBody()->write(
            $renderer->render($this->template, ['request' => $request])
        );

        return $response;
    }
1001035
public function render( RendererInterface $renderer )
    {
        if ( empty( $this->paragraphId ) )
        {
            return '';
        }

        return $renderer->htmlTag(
            'a',
            $this->getDescription(),
            array(
                'title' => $this->originalTitle,
                'href'  => '/app/' . $this->locale .
                           '/paragraph/render/' . $this->paragraphId,
            )
        );
    }
353662
public function render($src, $class = '', $id = '', array $attrs = array())
    {
        $attrs = array_merge(array(
            'frameborder' => 0,
            'content'     => null,
            'tag'         => 'iframe',
            'src'         => Str::trim($src)
        ), $attrs);

        $attrs   = $this->_cleanAttrs($attrs);
        $content = $attrs['content'];
        unset($attrs['content']);

        return Html::_('tag')->render($content, Str::trim($class), Str::trim($id), $attrs);
    }
121167
function render($class = '', $id = '', $return = false)
    {
        $link = $this->link . ($this->getparams ? '?'.$this->getparams.'&' : '?');
        ?>
        <div <?=(($id != '')? 'id="'.$id.'"' : '')?> <?=(($class != '')? 'class="'.$class.'"' : '')?>>
	        <a class="start" href="<?=$link?>p=1" title="Start">&nbsp;</a>
	        <a class="back" href="<?=$link?>p=<?=max($this->getPageNum() - 1, 1)?>"
		        title="Back">&nbsp;</a>
	        <?foreach($this->getPagesList() as $page):?>
	            <a class="number<?=($page == $this->getPageNum()? ' selected' : '')?>"
                    href="<?=$link?>p=<?=$page?>" title="Back"><?=$page?></a>
	        <?endforeach?>
	        <a class="next" href="<?=$link?>p=<?=min($this->getPageNum() + 1, $this->getPages())?>"
                title="Back">&nbsp;</a>
	        <a class="end" href="<?=$link?>p=<?=$this->getPages()?>"
                title="End">&nbsp;</a>
        </div>
        <?php
    }
296709
public function renderMenu(Collection $menu, RendererInterface $renderer = null)
	{
		if ($renderer === null) {
			$renderer = $this->getDefaultRenderer();
		}

		return $renderer->render($menu);
	}
99589
private function dumpObject(
        $object,
        int $level,
        bool $hideHeader = false,
        string $class = ''
    ): string {
        $indent = $this->style->indent($level);

        if (!$hideHeader) {
            $type = ($class ?: get_class($object)) . ' object ';

            $header = $this->style->apply($type, 'type', 'object') . "\n";
            $header .= $indent . $this->style->apply('(', 'syntax', '(') . "\n";
        } else {
            $header = '';
        }

        //Let's use method specifically created for dumping
        if (method_exists($object, '__debugInfo') || $object instanceof \Closure) {
            if ($object instanceof \Closure) {
                $debugInfo = $this->describeClosure($object);
            } else {
                $debugInfo = $object->__debugInfo();
            }

            if (is_array($debugInfo)) {
                //Pretty view
                $debugInfo = (object)$debugInfo;
            }

            if (is_object($debugInfo)) {
                //We are not including syntax elements here
                return $this->dumpObject($debugInfo, $level, false, get_class($object));
            }

            return $header
                . $this->dumpValue($debugInfo, '', $level + (is_scalar($object)), true)
                . $indent . $this->style->apply(')', 'syntax', ')') . "\n";
        }

        $refection = new \ReflectionObject($object);

        $output = '';
        foreach ($refection->getProperties() as $property) {
            $output .= $this->dumpProperty($object, $property, $level);
        }

        //Header, content, footer
        return $header . $output . $indent . $this->style->apply(')', 'syntax', ')') . "\n";
    }
77829
public static function print_r($var, $continue = false, $hide = false, $return = false)
    {
        return self::it($var, AbstractDumper::PRINT_R, $continue, $hide, $return);
    }