src/View/Helper/SnippetHelper.php
public function renderSnippet($name)
    {
        if (!isset($this->snippets[$name])) {
            throw new InvalidArgumentException(
                sprintf(
                    "Cannot find a snippet with name '%s'",
                    $name
                )
            );
        }

        return $this->getView()->render(
            $this->snippets[$name]['template'],
            $this->snippets[$name]['values']
        );
    }
public function renderSnippet($name)
    {
        if (!isset($this->snippets[$name])) {
            throw new InvalidArgumentException(
                sprintf(
                    "Cannot find a snippet with name '%s'",
                    $name
                )
            );
        }

        return $this->getView()->render(
            $this->snippets[$name]['template'],
            $this->snippets[$name]['values']
        );
    }
public function renderSnippet ( $ name ) { if ( ! isset ( $ this -> snippets [ $ name ] ) ) { throw new InvalidArgumentException ( sprintf ( "Cannot find a snippet with name '%s'" , $ name ) ) ; } return $ this -> getView ( ) -> render ( $ this -> snippets [ $ name ] [ 'template' ] , $ this -> snippets [ $ name ] [ 'values' ] ) ; }
Render a single snippet

@param string $name The snippet name
@throws InvalidArgumentException
@return string
Render a single snippet