API16

JBuffer/stream write: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 36: Line 36:


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=stream_write
  category=stream_write
  category=JBuffer
  category=JBuffer
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 01:20, 25 March 2017

<! removed transcluded page call, red link never existed >

Syntax

stream_write($data)
Parameter Name Default Value Description
$data

Defined in

libraries/joomla/utilities/buffer.php

Importing

jimport( 'joomla.utilities.buffer' );

Source Body

function stream_write($data)
{
        $left = substr($this->_buffers[$this->name], 0, $this->position);
        $right = substr($this->_buffers[$this->name], $this->position + strlen($data));
        $this->_buffers[$this->name] = $left . $data . $right;
        $this->position += strlen($data);
        return strlen($data);
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples