title: how to call CURLOPT_PROGRESSFUNCTION from controller
body: <p>I am using curl inside Controller to download a file. I would like to display a progress while file is downloading. I've read about that here: <a href="https://stackoverflow.com/questions/13958303/curl-download-progress-in-php">cURL download progress in PHP</a></p>
  
  <p>these two lines are needed:</p>
  
  <pre><code>curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, 'progress');
  curl_setopt($ch, CURLOPT_NOPROGRESS, false);
  </code></pre>
  
  <p>I've placed them inside a function in my controller but I am getting this error:
  curl_exec(): Cannot call the CURLOPT_PROGRESSFUNCTION</p>
  
  <p>I am suspecting that it's not working because it can't call it like progress() it should call it like $this->progress(). Is that correct? How do I specify this if my assumption is correct, if not what am I doing wrong?</p>