VCR\Util\StreamProcessor::stream_set_option PHP Method

stream_set_option() public method

Change stream options.
public stream_set_option ( integer $option, integer $arg1, integer $arg2 ) : boolean
$option integer One of STREAM_OPTION_BLOCKING, STREAM_OPTION_READ_TIMEOUT, STREAM_OPTION_WRITE_BUFFER.
$arg1 integer Depending on option.
$arg2 integer Depending on option.
return boolean Returns TRUE on success or FALSE on failure. If option is not implemented, FALSE should be returned.
    public function stream_set_option($option, $arg1, $arg2)
    {
        switch ($option) {
            case STREAM_OPTION_BLOCKING:
                return stream_set_blocking($this->resource, $arg1);
            case STREAM_OPTION_READ_TIMEOUT:
                return stream_set_timeout($this->resource, $arg1, $arg2);
            case STREAM_OPTION_WRITE_BUFFER:
                return stream_set_write_buffer($this->resource, $arg1);
            case STREAM_OPTION_READ_BUFFER:
                return stream_set_read_buffer($this->resource, $arg1);
            case STREAM_OPTION_CHUNK_SIZE:
                return stream_set_chunk_size($this->resource, $arg1);
        }
    }