public function setStreamingContext($context, callable $callback)
    {
        if (0 === $context &= ~7) { // 0b00000111
            throw new InvalidArgumentException("Context must be a valid context value");
        }

        $this->setFlags($context);
        $this->streamCallback = $callback;
    }