public function SessionStreamWrapper::stream_cast in Examples for Developers 8
Same name and namespace in other branches
- 3.x modules/stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php \Drupal\stream_wrapper_example\StreamWrapper\SessionStreamWrapper::stream_cast()
Retrieve the underlying stream resource.
This method is called in response to stream_select().
Parameters
int $cast_as: Can be STREAM_CAST_FOR_SELECT when stream_select() is calling stream_cast() or STREAM_CAST_AS_STREAM when stream_cast() is called for other uses.
Return value
resource|false The underlying stream resource or FALSE if stream_select() is not supported.
Overrides PhpStreamWrapperInterface::stream_cast
See also
http://php.net/manual/streamwrapper.stream-cast.php
File
- stream_wrapper_example/
src/ StreamWrapper/ SessionStreamWrapper.php, line 314
Class
- SessionStreamWrapper
- Example stream wrapper class to handle session:// streams.
Namespace
Drupal\stream_wrapper_example\StreamWrapperCode
public function stream_cast($cast_as) {
// @codingStandardsIgnoreEnd
return FALSE;
}