You are here

public function FnStream::__construct in Lockr 7.3

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;
  }
}