JDocumentHTML/getBuffer
From Joomla! Documentation
< API16:JDocumentHTML
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Contents
Description
Get the contents of a document include
<! removed transcluded page call, red link never existed >
Syntax
getBuffer($type=null, $name=null, $attribs=array())
Parameter Name | Default Value | Description |
---|---|---|
$type | null | $type The type of renderer |
$name | null | $name The name of the element to render |
$attribs | array() | $attribs Associative array of remaining attributes. |
Returns
The output of the renderer
Defined in
libraries/joomla/document/html/html.php
Importing
jimport( 'joomla.document.html.html' );
Source Body
function getBuffer($type = null, $name = null, $attribs = array())
{
// If no type is specified, return the whole buffer
if ($type === null) {
return $this->_buffer;
}
$result = null;
if (isset($this->_buffer[$type][$name])) {
return $this->_buffer[$type][$name];
}
// If the buffer has been explicitly turned off don't display or attempt to render
if ($result === false) {
return null;
}
$renderer = &$this->loadRenderer($type);
$this->setBuffer($renderer->render($name, $attribs, $result), $type, $name);
return $this->_buffer[$type][$name];
}
<! removed transcluded page call, red link never existed >