public function decorate($resource)
    {
        curl_setopt($resource, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt(
            $resource,
            CURLOPT_PROXY,
            sprintf(
                '%s:%s',
                $this->proxyHost,
                $this->proxyPort
            )
        );

        if ($this->proxyUser && $this->proxyPassword) {
            curl_setopt(
                $resource,
                CURLOPT_PROXYUSERPWD,
                sprintf(
                    '%s:%s',
                    $this->proxyUser,
                    $this->proxyPassword
                )
            );
        }
    }