docs: function (array) {
              var self = this,
                  deferred = new Deferred(),
                  fulfilled = 0,
                  length,
                  results = [],
                  hasError = false;
  
              if (!isArray(array)) {
                  array = slice.call(arguments);
              }
              length = array.length;
  
              if (length === 0) {
                  deferred.emitSuccess(results);
              } else {
                  array.forEach(function (promise, index) {
  
                      self.when(promise,
                          //Success
                          function (value) {
                              results[index] = value;
                              fulfilled += 1;
                              if (fulfilled === length) {
  
                                  if (hasError) {
                                      deferred.emitError(results);
                                  } else {
                                      deferred.emitSuccess(results);
                                  }
                              }
                          },
                          //Error
                          function (error) {
                              results[index] = error;
                              hasError = true;
                              fulfilled += 1;
                              if (fulfilled === length) {
                                  deferred.emitError(results);
                              }
                          }
                      );
                  });
              }
              return deferred.getPromise();
          }