public function EntityBody::setRewindFunction

Specify a custom callback used to rewind a non-seekable stream. This can be useful entity enclosing requests that are redirected.

Parameters

mixed $callable Callable to invoke to rewind a non-seekable stream. The callback must accept an: EntityBodyInterface object, perform the rewind if possible, and return a boolean representing whether or not the rewind was successful.

Return value

self

Overrides EntityBodyInterface::setRewindFunction

File

drupal/core/vendor/guzzle/http/Guzzle/Http/EntityBody.php, line 59

Class

EntityBody
Entity body used with an HTTP request or response

Namespace

Guzzle\Http

Code

public function setRewindFunction($callable) {
  if (!is_callable($callable)) {
    throw new InvalidArgumentException('Must specify a callable');
  }
  $this->rewindFunction = $callable;
  return $this;
}