function PhpStreamWrapperInterface::stream_flush

Same name in other branches
  1. 9 core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::stream_flush()
  2. 8.9.x core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::stream_flush()
  3. 10 core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::stream_flush()

Flushes the output.

This method is called in response to fflush() and when the stream is being closed while any un-flushed data has been written to it before. If you have cached data in your stream but not yet stored it into the underlying storage, you should do so now.

Note, if not implemented, FALSE is assumed as the return value.

Return value

bool Should return TRUE if the cached data was successfully stored (or if there was no data to store), or FALSE if the data could not be stored.

See also

fflush()

http://php.net/manual/en/streamwrapper.stream-flush.php

2 methods override PhpStreamWrapperInterface::stream_flush()
LocalStream::stream_flush in core/lib/Drupal/Core/StreamWrapper/LocalStream.php
ReadOnlyStream::stream_flush in core/lib/Drupal/Core/StreamWrapper/ReadOnlyStream.php
Support for fflush().

File

core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php, line 223

Class

PhpStreamWrapperInterface
Defines a generic PHP stream wrapper interface.

Namespace

Drupal\Core\StreamWrapper

Code

public function stream_flush();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.