OSS\Http\RequestCore::register_streaming_read_callback PHP Method

register_streaming_read_callback() public method

The user-defined callback function should accept three arguments:
  • $curl_handle - resource - Required - The cURL handle resource that represents the in-progress transfer.
  • $file_handle - resource - Required - The file handle resource that represents the file on the local file system.
  • $length - integer - Required - The length in kilobytes of the data chunk that was transferred.
public register_streaming_read_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_read_callback($callback)
    {
        $this->registered_streaming_read_callback = $callback;
        return $this;
    }