OSS\Http\RequestCore::register_streaming_write_callback PHP Method

register_streaming_write_callback() public method

The user-defined callback function should accept two arguments:
  • $curl_handle - resource - Required - The cURL handle resource that represents the in-progress transfer.
  • $length - integer - Required - The length in kilobytes of the data chunk that was transferred.
public register_streaming_write_callback ( string | array | function $callback )
$callback string | array | function (Required) The callback function is called by , so you can pass the following values:
  • The name of a global function to execute, passed as a string.
  • A method to execute, passed as array('ClassName', 'MethodName').
  • An anonymous function (PHP 5.3+).
    public function register_streaming_write_callback($callback)
    {
        $this->registered_streaming_write_callback = $callback;
        return $this;
    }