JDocumentHTML/setBuffer: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 48: | Line 48: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=setBuffer | category=setBuffer | ||
category=JDocumentHTML | category=JDocumentHTML | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 01:33, 25 March 2017
Description
Set the contents a document include
<! removed transcluded page call, red link never existed >
Syntax
setBuffer($content, $options=array())
| Parameter Name | Default Value | Description |
|---|---|---|
| $content | $content The content to be set in the buffer. | |
| $options | array() | $options Array of optional elements. |
Defined in
libraries/joomla/document/html/html.php
Importing
jimport( 'joomla.document.html.html' );
Source Body
public function setBuffer($content, $options = array())
{
// The following code is just for backward compatibility.
if (func_num_args() > 1 && !is_array($options)) {
$args = func_get_args(); $options = array();
$options['type'] = $args[1];
$options['name'] = (isset($args[2])) ? $args[2] : null;
}
$this->_buffer[$options['type']][$options['name']] = $content;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples