public function addProcessor($callback, $processBufferRecord = false)
    {
        if (!is_callable($callback) && !$this->isInstanceOf($callback, ProcessorInterface::class)) {
            throw new \InvalidArgumentException('Processor must be valid callable or an instance of ' . ProcessorInterface::class);
        }

        if ($processBufferRecord) {
            $this->bufferProcessors->prepend($callback);
        } else {
            $this->processors->prepend($callback);
        }


        return $this;
    }