You are here

public function FnStream::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/src/FnStream.php \GuzzleHttp\Psr7\FnStream::__construct()

Parameters

array $methods Hash of method name to a callable.:

File

vendor/guzzlehttp/psr7/src/FnStream.php, line 25

Class

FnStream
Compose stream implementations based on a hash of functions.

Namespace

GuzzleHttp\Psr7

Code

public function __construct(array $methods) {
  $this->methods = $methods;

  // Create the functions on the class
  foreach ($methods as $name => $fn) {
    $this->{'_fn_' . $name} = $fn;
  }
}