class MultiTransferException

Exception encountered during a multi transfer

Hierarchy

Expanded class hierarchy of MultiTransferException

1 file declares its use of MultiTransferException
CurlMulti.php in drupal/core/vendor/guzzle/http/Guzzle/Http/Curl/CurlMulti.php

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Exception/MultiTransferException.php, line 11

Namespace

Guzzle\Http\Exception
View source
class MultiTransferException extends ExceptionCollection {
  protected $successfulRequests = array();
  protected $failedRequests = array();

  /**
   * Get all of the requests in the transfer
   *
   * @return array
   */
  public function getAllRequests() {
    return array_merge($this->successfulRequests, $this->failedRequests);
  }

  /**
   * Add to the array of successful requests
   *
   * @param RequestInterface $request Successful request
   *
   * @return self
   */
  public function addSuccessfulRequest(RequestInterface $request) {
    $this->successfulRequests[] = $request;
    return $this;
  }

  /**
   * Add to the array of failed requests
   *
   * @param RequestInterface $request Failed request
   *
   * @return self
   */
  public function addFailedRequest(RequestInterface $request) {
    $this->failedRequests[] = $request;
    return $this;
  }

  /**
   * Set all of the successful requests
   *
   * @param array Array of requests
   *
   * @return self
   */
  public function setSuccessfulRequests(array $requests) {
    $this->successfulRequests = $requests;
    return $this;
  }

  /**
   * Set all of the failed requests
   *
   * @param array Array of requests
   *
   * @return self
   */
  public function setFailedRequests(array $requests) {
    $this->failedRequests = $requests;
    return $this;
  }

  /**
   * Get an array of successful requests sent in the multi transfer
   *
   * @return array
   */
  public function getSuccessfulRequests() {
    return $this->successfulRequests;
  }

  /**
   * Get an array of failed requests sent in the multi transfer
   *
   * @return array
   */
  public function getFailedRequests() {
    return $this->failedRequests;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ExceptionCollection::$exceptions protected property
ExceptionCollection::add public function Add exceptions to the collection
ExceptionCollection::count public function Get the total number of request exceptions
ExceptionCollection::getFirst public function Get the first exception in the collection
ExceptionCollection::getIterator public function Allows array-like iteration over the request exceptions
ExceptionCollection::setExceptions public function Set all of the exceptions
MultiTransferException::$failedRequests protected property
MultiTransferException::$successfulRequests protected property
MultiTransferException::addFailedRequest public function Add to the array of failed requests
MultiTransferException::addSuccessfulRequest public function Add to the array of successful requests
MultiTransferException::getAllRequests public function Get all of the requests in the transfer
MultiTransferException::getFailedRequests public function Get an array of failed requests sent in the multi transfer
MultiTransferException::getSuccessfulRequests public function Get an array of successful requests sent in the multi transfer
MultiTransferException::setFailedRequests public function Set all of the failed requests
MultiTransferException::setSuccessfulRequests public function Set all of the successful requests