public function setProgressHandler($progress_handler)
    {
        if ($progress_handler !== null && is_callable($progress_handler)) {
            $this->progress_handler = $progress_handler;
        } elseif ($progress_handler === null) {
            $this->progress_handler = null;
        } else {
            throw new \InvalidArgumentException('Argument "progress_handler" must be a callable');
        }
    }