Exemplo n.º 1
0
 /**
  * Sends a request pool.
  *
  * @param \ArrayObject $requestList Request list
  * @return \HttpRequestPool
  * @throws \Jyxo\Webdav\Exception On error
  */
 private function sendPool(\ArrayObject $requestList)
 {
     try {
         // Clean the pool
         $this->pool->reset();
         // Attach requests
         foreach ($requestList as $request) {
             $this->pool->attach($request);
         }
         // Send
         $this->pool->send();
         return $this->pool;
     } catch (\HttpException $e) {
         // Find the innermost exception
         $inner = $e;
         while (null !== $inner->innerException) {
             $inner = $inner->innerException;
         }
         throw new Exception($inner->getMessage(), 0, $inner);
     }
 }