function DummyExternalReadOnlyWrapper::stream_eof

Same name and namespace in other branches
  1. 9 core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php \Drupal\file_test\StreamWrapper\DummyExternalReadOnlyWrapper::stream_eof()
  2. 11.x core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php \Drupal\file_test\StreamWrapper\DummyExternalReadOnlyWrapper::stream_eof()

Tests for end-of-file on a file pointer.

This method is called in response to feof().

Warning, when reading the whole file (for example, with file_get_contents()), PHP will call PhpStreamWrapperInterface::stream_read() followed by PhpStreamWrapperInterface::stream_eof() in a loop but as long as PhpStreamWrapperInterface::stream_read() returns a non-empty string, the return value of PhpStreamWrapperInterface::stream_eof() is ignored.

Return value

bool Should return TRUE if the read/write position is at the end of the stream and if no more data is available to be read, or FALSE otherwise.

Overrides PhpStreamWrapperInterface::stream_eof

File

core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php, line 103

Class

DummyExternalReadOnlyWrapper
Helper class for testing the stream wrapper registry.

Namespace

Drupal\file_test\StreamWrapper

Code

public function stream_eof() {
    return FALSE;
}

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