original_string: public function deleteContainers($containers, $force = false)
      {
          if (!empty($containers)) {
              if (!isset($containers[0])) {
                  // single folder, make into array
                  $containers = [$containers];
              }
              foreach ($containers as $key => $folder) {
                  try {
                      // path is full path, name is relative to root, take either
                      $name = array_get($folder, 'name', trim(array_get($folder, 'path'), '/'));
                      if (!empty($name)) {
                          $this->deleteContainer($name, $force);
                      } else {
                          throw new DfException('No name found for container in delete request.');
                      }
                  } catch (\Exception $ex) {
                      // error whole batch here?
                      $containers[$key]['error'] = ['message' => $ex->getMessage(), 'code' => $ex->getCode()];
                  }
              }
          }
  
          return $containers;
      }
code: public function deleteContainers($containers, $force = false)
      {
          if (!empty($containers)) {
              if (!isset($containers[0])) {
                  // single folder, make into array
                  $containers = [$containers];
              }
              foreach ($containers as $key => $folder) {
                  try {
                      // path is full path, name is relative to root, take either
                      $name = array_get($folder, 'name', trim(array_get($folder, 'path'), '/'));
                      if (!empty($name)) {
                          $this->deleteContainer($name, $force);
                      } else {
                          throw new DfException('No name found for container in delete request.');
                      }
                  } catch (\Exception $ex) {
                      // error whole batch here?
                      $containers[$key]['error'] = ['message' => $ex->getMessage(), 'code' => $ex->getCode()];
                  }
              }
          }
  
          return $containers;
      }
code_tokens: public function deleteContainers ( $ containers , $ force = false ) { if ( ! empty ( $ containers ) ) { if ( ! isset ( $ containers [ 0 ] ) ) { // single folder, make into array $ containers = [ $ containers ] ; } foreach ( $ containers as $ key => $ folder ) { try { // path is full path, name is relative to root, take either $ name = array_get ( $ folder , 'name' , trim ( array_get ( $ folder , 'path' ) , '/' ) ) ; if ( ! empty ( $ name ) ) { $ this -> deleteContainer ( $ name , $ force ) ; } else { throw new DfException ( 'No name found for container in delete request.' ) ; } } catch ( \ Exception $ ex ) { // error whole batch here? $ containers [ $ key ] [ 'error' ] = [ 'message' => $ ex -> getMessage ( ) , 'code' => $ ex -> getCode ( ) ] ; } } } return $ containers ; }
docstring: Delete multiple containers and all of their content
  
  @param array $containers
  @param bool  $force Force a delete if it is not empty
  
  @throws DfException
  @return array
docstring_tokens: Delete multiple containers and all of their content