protected function curlWriteFunction($ch, $content)
    {
        if (!$this->hasStarted) {
            $this->hasStarted = true;

            $this->getEventsManager()->fire(self::EVENT_START, $this);
        }

        $length = strlen($content);

        $this->getEventsManager()->fire(self::EVENT_PROGRESS, $this, $content);

        return $length;
    }