public function Stream::write

Write data to the stream

Parameters

string $string The string that is to be written.:

Return value

int|bool Returns the number of bytes written to the stream on success or FALSE on failure.

Overrides StreamInterface::write

File

drupal/core/vendor/guzzle/stream/Guzzle/Stream/Stream.php, line 276

Class

Stream
PHP stream implementation

Namespace

Guzzle\Stream

Code

public function write($string) {
  if (!$this->cache[self::IS_WRITABLE]) {
    return 0;
  }
  $bytes = fwrite($this->stream, $string);
  $this->size += $bytes;
  return $bytes;
}