Protobuf\Stream::__construct PHP Method

__construct() public method

public __construct ( resource $stream, integer $size = null )
$stream resource
$size integer
    public function __construct($stream, $size = null)
    {
        if (!is_resource($stream)) {
            throw new InvalidArgumentException('Stream must be a resource');
        }
        $this->size = $size;
        $this->stream = $stream;
    }