public function setPromise( PromiseInterface $promise ): self
	{
		$this->promise = $promise;
		$promise->then($this->onFulfilled, $this->onRejected);
		return $this;
	}
public function setPromise( PromiseInterface $promise ): self
	{
		$this->promise = $promise;
		$promise->then($this->onFulfilled, $this->onRejected);
		return $this;
	}
public function setPromise ( PromiseInterface $ promise ) : self { $ this -> promise = $ promise ; $ promise -> then ( $ this -> onFulfilled , $ this -> onRejected ) ; return $ this ; }
Promise setter.

@param PromiseInterface $promise

@return AsyncRequest
Promise setter .