public function LocalStream::stream_cast
public LocalStream::stream_cast($cast_as)
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
- core/lib/Drupal/Core/StreamWrapper/LocalStream.php, line 302
Class
- LocalStream
- Defines a Drupal stream wrapper base class for local files.
Namespace
Drupal\Core\StreamWrapperCode
public function stream_cast($cast_as) { return $this->handle ? $this->handle : FALSE; }
© 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!LocalStream.php/function/LocalStream::stream_cast/8.1.x