function PhpStreamWrapperInterface::stream_write
Same name in other branches
- 9 core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::stream_write()
- 8.9.x core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::stream_write()
- 10 core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::stream_write()
Write to stream.
This method is called in response to fwrite(). Remember to update the current position of the stream by number of bytes that were successfully written.
Parameters
string $data: Should be stored into the underlying stream. If there is not enough room in the underlying stream, store as much as possible.
Return value
int Should return the number of bytes that were successfully stored, or 0 if none could be stored.
See also
fwrite()
http://php.net/manual/en/streamwrapper.stream-write.php
2 methods override PhpStreamWrapperInterface::stream_write()
- LocalStream::stream_write in core/
lib/ Drupal/ Core/ StreamWrapper/ LocalStream.php - Write to stream.
- ReadOnlyStream::stream_write in core/
lib/ Drupal/ Core/ StreamWrapper/ ReadOnlyStream.php - Support for fwrite(), file_put_contents() etc.
File
-
core/
lib/ Drupal/ Core/ StreamWrapper/ PhpStreamWrapperInterface.php, line 471
Class
- PhpStreamWrapperInterface
- Defines a generic PHP stream wrapper interface.
Namespace
Drupal\Core\StreamWrapperCode
public function stream_write($data);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.