FOF30\Utils\Buffer::stream_write PHP Method

stream_write() public method

Write stream
See also: streamWrapper::stream_write
Since: 11.1
public stream_write ( string $data ) : integer
$data string The data to write to the stream.
return integer
    public function stream_write($data)
    {
        $left = substr(static::$buffers[$this->name], 0, $this->position);
        $right = substr(static::$buffers[$this->name], $this->position + strlen($data));
        static::$buffers[$this->name] = $left . $data . $right;
        $this->position += strlen($data);
        return strlen($data);
    }