You are here

public function SessionStreamWrapper::stream_set_option in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php \Drupal\stream_wrapper_example\StreamWrapper\SessionStreamWrapper::stream_set_option()

Change stream options.

This method is called to set options on the stream.

Parameters

int $option: One of:

int $arg1: If option is:

  • STREAM_OPTION_BLOCKING: The requested blocking mode:

    • 1 means blocking.
    • 0 means not blocking.
  • STREAM_OPTION_READ_TIMEOUT: The timeout in seconds.
  • STREAM_OPTION_WRITE_BUFFER: The buffer mode, STREAM_BUFFER_NONE or STREAM_BUFFER_FULL.

int $arg2: If option is:

  • STREAM_OPTION_BLOCKING: This option is not set.
  • STREAM_OPTION_READ_TIMEOUT: The timeout in microseconds.
  • STREAM_OPTION_WRITE_BUFFER: The requested buffer size.

Return value

bool TRUE on success, FALSE otherwise. If $option is not implemented, FALSE should be returned.

Overrides PhpStreamWrapperInterface::stream_set_option

File

stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php, line 390

Class

SessionStreamWrapper
Example stream wrapper class to handle session:// streams.

Namespace

Drupal\stream_wrapper_example\StreamWrapper

Code

public function stream_set_option($option, $arg1, $arg2) {

  // @codingStandardsIgnoreEnd
  return FALSE;
}