Download the PHP package spoova/iotext without Composer

On this page you can find all versions of the php package spoova/iotext. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package iotext

IOTextStream

Live, single-request progress streaming for PHP.

Send one AJAX request, get real-time status updates back โ€” no polling, no background jobs, no extra endpoints. IOTextStream lets a long-running PHP process push lines like Processing data..., Extracting data..., Compressing file... straight to the client as they happen, over the same connection that started the request.

Part of the spoova/mi framework โ€” spoova\mi\core\classes\Bundle\IOText.


Why

Most "live progress" tutorials reach for polling: hit an endpoint every second, ask "are we done yet?". It works, but it's chatty, laggy, and needs somewhere to persist state between requests.

IOTextStream takes a simpler path: PHP output buffering plus chunked responses. The server echos and flush()es as work happens; the client reads the response body as a stream instead of waiting for it to finish. One request, real-time output, no extra moving parts.

Features

Installation

IOTextStream ships as part of spoova/mi:

Quick start

Streaming directly from the request

Use this when the work โ€” extracting, compressing, whatever โ€” happens in the same PHP process that's handling the request.

Each stream_view() call writes a line, flushes it to the client immediately, and counts toward IOTextStream::progress().

Reading it on the client

fetch() with a ReadableStream reader is what makes this work โ€” plain XMLHttpRequest can't read a response cleanly while it's still arriving.

done becomes true once PHP's script ends and the connection closes โ€” not based on anything in the message content itself.

Watching a file instead

If the actual work happens in a separate process (a queued job, a subprocess, a CLI script), there's no shared PHP process to echo from directly. IOTextStream::stream_file() bridges that gap by watching a file for changes and relaying them into the response.

The callback receives a read-only IOTextFile snapshot with everything you need to react to changes:

Method Returns
file() Path being watched
text() Full file contents so far
lines() File contents split into lines
lineCount() Number of lines
textFromLine(int $n) 1-based line lookup
isModified() false on the first read, true after
modifiedAt() Last modification timestamp
tick() Number of times a change has been detected
exists() Whether the file currently exists
stop() Ends the watch loop

IOTextFile is abstract and only ever produced internally through a GhostProxy while stream_file() is running โ€” it isn't meant to be instantiated directly.

API reference

Output

Method Tracked? Description
view(string $message, int $timeout = 0) No Writes and flushes a plain text line
json(array $message, int $timeout = 0) No Writes and flushes a JSON-encoded line
stream_view(string $message, int $timeout = 0) Yes Same as view(), counted toward progress
stream_out(string $message, int $timeout = 0) Yes Alias of stream_view()
stream_json(array $message, int $timeout = 0) Yes Same as json(), counted toward progress
issue_text(string $message) No Writes a line and immediately exits
issue_json(array $message) No Writes a JSON line and immediately exits

Context & progress

Method Description
init(int $steps = 0) Starts a new streaming context โ€” sets headers, opens the output buffer, pushes fresh counters
close() Ends the current context and restores the previous one, if any
steps(int $steps) Sets the total step count used to calculate progress
interval(int $milliseconds) Sets a default delay applied after each message
progress(bool $int = false) Percentage complete, based on tracked messages vs. total steps
views() Total messages written in the current context
streams() Total tracked messages written in the current context
pause(int $seconds) Blocking delay, in seconds
wait(int $milliseconds) Blocking delay, in milliseconds

File watching

Method Description
stream_file(string $path, Closure $callback, float $interval = 1.0) Watches $path for changes, invoking $callback(IOTextFile $file) on the first read and every change after, until $file->stop() is called

Nested & sequential contexts

Every method above operates on a stack of independent contexts under the hood, so you can safely bracket multiple phases without one's counters bleeding into another's โ€” while every call stays a plain static method:

Server configuration notes

Chunked flushing only reaches the browser if nothing between PHP and the client buffers it up first:

Test streaming behavior early in your environment โ€” a working flush() locally doesn't guarantee the chunks survive every layer of infrastructure in front of it.

License

Part of the spoova/mi framework. See the main project repository for license details.


All versions of iotext with dependencies

PHP Build Version
Package Version
Requires spoova/ghost Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package spoova/iotext contains the following files

Loading the files please wait ...