W3cubDocs

/Drupal 8

public function PhpStreamWrapperInterface::stream_set_option

public PhpStreamWrapperInterface::stream_set_option($option, $arg1, $arg2)

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.

File

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

Class

PhpStreamWrapperInterface
Defines a generic PHP stream wrapper interface.

Namespace

Drupal\Core\StreamWrapper

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!StreamWrapper!PhpStreamWrapperInterface.php/function/PhpStreamWrapperInterface::stream_set_option/8.1.x