YoastSEO_Vendor\GuzzleHttp\Psr7
FnStream::decorate() public Yoast 1.0
Adds custom functionality to an underlying stream by intercepting specific method calls.
{} Это метод класса: FnStream{}
Хуков нет.
Возвращает
FnStream.
Использование
$result = FnStream::decorate( \YoastSEO_Vendor\Psr\Http\Message\StreamInterface $stream, $methods );
- $stream(Streamчислоerface) (обязательный)
- Stream to decorate
- $methods(массив) (обязательный)
- Hash of method name to a closure
Код FnStream::decorate() FnStream::decorate Yoast 15.7
public static function decorate(\YoastSEO_Vendor\Psr\Http\Message\StreamInterface $stream, array $methods)
{
// If any of the required methods were not provided, then simply
// proxy to the decorated stream.
foreach (\array_diff(self::$slots, \array_keys($methods)) as $diff) {
$methods[$diff] = [$stream, $diff];
}
return new self($methods);
}