Download the PHP package talesoft/tale-stream without Composer

On this page you can find all versions of the php package talesoft/tale-stream. 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 tale-stream

Packagist License CI Coverage

Tale Stream

What is Tale Stream?

This is a direct implementation of the PSR-7 Psr\Http\Message\StreamInterface and the PSR-17 Psr\Http\Message\StreamFactoryInterface. It doesn't add any extra methods, only a few utility stream factories and some useful iterators for streams.

It acts as a stable streaming library core for full-fledged streaming libraries like socket implementations or filesystem abstractions.

Installation

Usage

Check out the Functions File to see all things this library does.

Stream all the things

The heart is the Tale\Stream class you can use with the Tale\stream function. You can pass any resource of type stream and have a PSR-7 compatible stream for any purpose.

Create a Stream factory for DI containers

File Streams

The filestream works analogous to the fopen($filename, $mode, $useIncludePath, $context) function.

Memory Streams

Memory streams only reside in memory and are gone when the execution ended. This is very useful to create streams on the fly wherever you need one. They are always readable and writable.

Temporary Streams

Temporary streams work like memory streams, but at some point they will start swapping data into a file to save memory.

Input Stream

The input stream is a readable file stream on php://input. In most cases, this is the raw HTTP request body and useful for APIs that work with structured data formats.

Output Stream

The output stream is a writable file stream on php://output. This is mostly the output content that is sent to the browser.

STDIN Stream

The standard input stream is a readable file stream on php://stdin. This is e.g. content from a piped command.

STDERR Stream

The standard error stream is a writable file stream on php://stderr. This is mostly used for output of errors in console commands.

STDOUT Stream

The standard output stream is a writable file stream on php://stdout. This is mostly console command output.

Null Stream

The null-stream does nothing. It only implements the interfaces. Useful to avoid defensive null checks on optional dependencies, to suppress things and for testing.

Read streams with iterators

The ReadIterator will read a stream chunk-by-chunk (default chunk size is 1024). Notice, all the iterators here work with any PSR-7 stream, not only Tale\Stream instances.

Iterate lines of a stream

The LineIterator works differently to fgets(). While the chunk size on fgets() limits the length a line can has, the LineIterator will just wait for the actual end of the line and doesn't care about the chunk size.

Split streams by delimiters

The SplitIterator is the reason why the LineIterator can work like it does. It can split streams by any delimiter of any length and doesn't care about the chunk size of the internal reader.

Write to streams with iterators

The WriteIterator is a utility to write iterables to streams easily.

Pipe streams

The ReadIterator and WriteIterator combined provide a solid way to pipe streams efficiently.


All versions of tale-stream with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
psr/http-message Version ^1.0
psr/http-factory Version ^1.0
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 talesoft/tale-stream contains the following files

Loading the files please wait ....