callable = $callable; return $this; } /** * Set additional context for the callable function. This data will be passed into the callable function as the * second argument * * @param array $context Additional context * * @return self */ public function setContext(array $context) { $this->context = $context; return $this; } /** * {@inheritdoc} */ public function doWait() { if (!$this->callable) { throw new RuntimeException('No callable was specified for the wait method'); } return call_user_func($this->callable, $this->attempts, $this->context); } }