Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/./../app/.././../../finland.picotech.app/public_html/storage/../vendor/./phpoption/../laravel/../tijsverkoyen/../barryvdh/laravel-dompdf/../../maennchen/zipstream-php/./guides
الملفات الموجودة في هذا الـ Path:
.
..
ContentLength.rst
FlySystem.rst
Nginx.rst
Options.rst
PSR7Streams.rst
StreamOutput.rst
Symfony.rst
Varnish.rst
index.rst

مشاهدة ملف: PSR7Streams.rst

Usage with PSR 7 Streams
===============

PSR-7 streams are `standardized streams <https://www.php-fig.org/psr/psr-7/>`_.

ZipStream-PHP supports working with these streams with the function
``addFileFromPsr7Stream``. 

For all parameters of the function see the API documentation.

Example
---------------

.. code-block:: php

    $stream = $response->getBody();
    // add a file named 'streamfile.txt' from the content of the stream
    $zip->addFileFromPsr7Stream(
        fileName: 'streamfile.txt',
        stream: $stream,
    );