Lines Matching full:stream
37 namespace Hoa\Stream;
44 * Class \Hoa\Stream.
51 abstract class Stream implements IStream\Stream, Event\Listenable class
56 * Name index in the stream bucket.
63 * Handler index in the stream bucket.
70 * Resource index in the stream bucket.
77 * Context index in the stream bucket.
91 * Current stream bucket.
98 * Static stream register.
112 * Original stream name, given to the stream constructor.
133 * Whether this stream is already opened by another handler.
142 * Set the current stream.
146 * @param string $streamName Stream name (e.g. path or URL).
148 * `Hoa\Stream\Context` class).
184 * Get a stream in the register.
185 * If the stream does not exist, try to open it by calling the
188 * @param string $streamName Stream name.
189 * @param \Hoa\Stream $handler Stream handler.
191 * \Hoa\Stream\Context class).
193 * @throws \Hoa\Stream\Exception
197 Stream $handler,
223 'hoa://Event/Stream/' . $streamName,
228 'hoa://Event/Stream/' . $streamName . ':close-before',
244 * Open the stream and return the associated resource.
248 * @param string $streamName Stream name (e.g. path or URL).
249 * @param \Hoa\Stream\Context $context Context.
256 * Close the current stream.
265 * Open the stream.
267 * @return \Hoa\Stream
268 * @throws \Hoa\Stream\Exception
304 * Close the current stream.
318 'hoa://Event/Stream/' . $streamName . ':close-before',
330 'hoa://Event/Stream/' . $streamName
333 'hoa://Event/Stream/' . $streamName . ':close-before'
340 * Get the current stream name.
354 * Get the current stream.
368 * Get the current stream context.
370 * @return \Hoa\Stream\Context
382 * Get stream handler according to its name.
384 * @param string $streamName Stream name.
385 * @return \Hoa\Stream
399 * Set the current stream. Useful to manage a stack of streams (e.g. socket
405 * @throws \Hoa\Stream\Exception
407 public function _setStream($stream) argument
409 if (false === is_resource($stream) &&
410 ('resource' !== gettype($stream) ||
411 'Unknown' !== get_resource_type($stream))) {
413 'Try to change the stream resource with an invalid one; ' .
416 gettype($stream)
421 $this->_bucket[self::RESOURCE] = $stream;
427 * Check if the stream is opened.
449 * Whether the opening of the stream has been deferred
482 * Set stream buffer.
485 * output stream, each is paused after 8 Ko of data to allow the other to
492 * stream.
508 * Disable stream buffering.
519 * Get stream buffer size.
529 * Get stream wrapper name.
543 * Get stream meta data.
553 * Whether this stream is already opened by another handler.
609 * Call the $handler->close() method on each stream in the static stream
612 * if a stream is persistent, the $handler->close() should do anything. It
637 * Close the stream when destructing.
654 * Class \Hoa\Stream\_Protocol.
656 * The `hoa://Library/Stream` node.
668 protected $_name = 'Stream';
680 return Stream::getStreamHandler($id);
687 Consistency::flexEntity('Hoa\Stream\Stream');
692 Consistency::registerShutdownFunction(xcallable('Hoa\Stream\Stream::_Hoa_Stream'));
695 * Add the `hoa://Library/Stream` node. Should be use to reach/get an entry
696 * in the stream register.