src/Stream.php
public function attach($resource){
        if(!is_resource($resource) || "stream" !== get_resource_type($resource)){
            throw new \InvalidArgumentException(
                "Argument must be of the type stream resource, " . gettype($resource) . " given."
            );
        }

        $this->resource = $resource;
    }
public function attach($resource){
        if(!is_resource($resource) || "stream" !== get_resource_type($resource)){
            throw new \InvalidArgumentException(
                "Argument must be of the type stream resource, " . gettype($resource) . " given."
            );
        }

        $this->resource = $resource;
    }
public function attach ( $ resource ) { if ( ! is_resource ( $ resource ) || "stream" !== get_resource_type ( $ resource ) ) { throw new \ InvalidArgumentException ( "Argument must be of the type stream resource, " . gettype ( $ resource ) . " given." ) ; } $ this -> resource = $ resource ; }
Attach resource.

@param resource $resource

@return  void
Attach resource .