以上就是本篇文章【苹果cms V10-快猫视频-二开苹果CMS视频网站源码模板-可封装双端APP】的全部内容了,欢迎阅览 ! 文章地址:https://sicmodule.kub2b.com/quote/12333.html
栏目首页
相关文章
动态
同类文章
热门文章
网站地图
返回首页 企库往资讯移动站https://sicmodule.kub2b.com/mobile/,查看更多
苹果cms V10-快猫视频-二开苹果CMS视频网站源码模板-可封装双端APP
2024-12-25 02:19
# PSR-7 Message Implementation
This repository contains a full [PSR-7](http://www.php-fig.org/psr/psr-7/)
message implementation, several stream decorators, and some helpful
functionality like query string parsing.
[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7)
# Stream implementation
This package comes with a number of stream implementations and stream
decorators.
## AppendStream
`GuzzleHttpPsr7AppendStream`
Reads from multiple streams, one after the other.
```php
use GuzzleHttpPsr7;
$a = Psr7stream_for('abc, ');
$b = Psr7stream_for('123.');
$composed = new Psr7AppendStream([$a, $b]);
$composed->addStream(Psr7stream_for(' Above all listen to me'));
echo $composed; // abc, 123. Above all listen to me.
```
## BufferStream
`GuzzleHttpPsr7BufferStream`
Provides a buffer stream that can be written to fill a buffer, and read
from to remove bytes from the buffer.
This stream returns a "hwm" metadata value that tells upstream consumers
what the configured high water mark of the stream is, or the maximum
preferred size of the buffer.
```php
use GuzzleHttpPsr7;
// When more than 1024 bytes are in the buffer, it will begin returning
// false to writes. This is an indication that writers should slow down.
$buffer = new Psr7BufferStream(1024);
```
## CachingStream
The CachingStream is used to allow seeking over previously read bytes on
non-seekable streams. This can be useful when transferring a non-seekable
entity body fails due to needing to rewind the stream (for example, resulting
from a redirect). Data that is read from the remote stream will be buffered in
a PHP temp stream so that previously read bytes are cached first in memory,
then on disk.
```php
use GuzzleHttpPsr7;
$original = Psr7stream_for(fopen('http://www.google.com', 'r'));
$stream = new Psr7CachingStream($original);
$stream->read(1024);