Lines Matching refs:a

8 …<a href="https://travis-ci.org/hoaproject/stream"><img src="https://img.shields.io/travis/hoaproje…
9a href="https://coveralls.io/github/hoaproject/stream?branch=master"><img src="https://img.shields…
10 …<a href="https://packagist.org/packages/hoa/stream"><img src="https://img.shields.io/packagist/dt/…
11 …<a href="https://hoa-project.net/LICENSE"><img src="https://img.shields.io/packagist/l/hoa/stream.…
14 Hoa is a <strong>modular</strong>, <strong>extensible</strong> and
16 Moreover, Hoa aims at being a bridge between industrial and research worlds.
26 This library is a high-level abstraction over PHP streams. It
38 destination of a stream, useful for instance to encrypt/decrypt a
43 * Interfaces: One interface per capability a stream can offer.
85 As a quick overview, we propose to discover what `Hoa\Stream` provides
87 most important part of this library. Then, how to define a stream,
95 capabilities. This is very useful when designing a function, or a
100 * `In`, to read from a stream, provides `read`, `readInteger`,
102 * `Out`, to write onto a stream, provides `write`, `writeArray`,
108 * `Lockable`, to lock a stream, provides `lock` and several
115 * `Statable`, to get statistics about a stream, provides `getSize`,
117 * `Structural`, for a structural stream, i.e. a stream acting like a
122 Thus, if one only need to read from a stream, it will type the stream
130 ### Define a concrete stream
134 respectively to open a particular stream, and to close this particular
194 represents a set of options and parameters for the stream.
211 And thus, we can ask a stream to use this context based on the chosen
232 execute a function before the `/path/to/file` stream closes, one
243 Remember that a stream is not necessarily a file. It can be a socket,
244 a WebSocket, a stringbuffer, any stream you have defined…
253 Now let's move on to listeners. To register a listener, we must create
265 Passing `null` as a second argument means: No context. Note that we
332 * `complete`, when the stream is complete (meaning can vary a lot here),
333 * `connect`, when the stream is connected (meaning can vary a lot here),
338 * `resolve`, when the stream is resolved (meaning can vary a lot here),
351 * `STREAM_NOTIFY_SEVERITY_ERR`, a critical error occurred,
353 * `message`, a string containing most useful information,
358 listeners. Please, take a look at
372 and `getRegistered` methods are also helpful. A wrapper is represented by a class:
379 interface. It is a combination of two other interfaces in the same
382 The `Stream` interface requires to implement several methods related to a stream, such as:
400 The `File` interface requires to implement other methods related to stream acting as a file, such a…
417 A stream is like a pipe, with an input, and an output. This is
418 possible to cut this pipe in two pieces, and insert a small part: A
427 the form of a class extending the `Hoa\Stream\Filter\Basic` filter,
430 Once a filter is registered, we can apply it on a stream by using its
432 several filters can be applied on a stream, in a specific order, like
433 “decrypt”, “unzip”, “transform to…”. In such a scenario, the order
441 Let's implement a filter that changes the content of the stream into
467 Great. Now let's register our filter under a specific name:
474 Then, we must apply the filter on a specific stream, so let's open a
491 A filter is a low-level stream API. It integrates with all kind of
492 streams. And this is a very powerful tool. We mentionned some usages
499 The `Hoa\Stream\Filter\LateComputed` class is a special filter. It
503 content of the stream. This is really a buffer. Why would it be
504 useful? For instance if you are reading a PHP file, you can transform
505 the source code on-the-fly by using a parser —for instance— and
509 This is also possible to auto-apply a filter with… a wrapper! For
510 example the `instrument://` wrapper can prepend a filter to the stream
522 An XML stream reads and writes from another inner stream (a file, a
525 allows a string to be manipulated with a stream API, so the stream