public function write($data)
    {
        $dataLength     = strlen($data);
        $start          = substr($this->buffer, 0, $this->position);
        $end            = substr($this->buffer, $this->position + $dataLength);
        $this->buffer   = $start.$data.$end;
        $this->length   = strlen($this->buffer);
        $this->position += $dataLength;
        return $dataLength;
    }
public function write($data)
    {
        $dataLength     = strlen($data);
        $start          = substr($this->buffer, 0, $this->position);
        $end            = substr($this->buffer, $this->position + $dataLength);
        $this->buffer   = $start.$data.$end;
        $this->length   = strlen($this->buffer);
        $this->position += $dataLength;
        return $dataLength;
    }
public function write ( $ data ) { $ dataLength = strlen ( $ data ) ; $ start = substr ( $ this -> buffer , 0 , $ this -> position ) ; $ end = substr ( $ this -> buffer , $ this -> position + $ dataLength ) ; $ this -> buffer = $ start . $ data . $ end ; $ this -> length = strlen ( $ this -> buffer ) ; $ this -> position += $ dataLength ; return $ dataLength ; }
Writes the given date into the buffer at the current pointer position

@param   string  $data       The data to write
@return  integer             The number of bytes written
Writes the given date into the buffer at the current pointer position