code: function(source) {
          var isArray = OpenLayers.Util.isArray(source);
          if (!isArray) {
              source = [source];
          }
          var target = new Array(source.length),
              current;
          for (var i=0, ii=source.length; i<ii; ++i) {
              current = source[i];
              target[i] = current instanceof OpenLayers.Feature.Vector ?
                  current : new OpenLayers.Feature.Vector(current);
          }
          return isArray ? target : target[0];
      }
docs: Method: toFeatures
  Converts spatial input into features so it can be processed by
  <OpenLayers.Format> instances.
  
  Parameters:
  source - {Mixed} An <OpenLayers.Geometry>, an
  <OpenLayers.Feature.Vector>, or an array of geometries or features
  
  Returns:
  {Array(<OpenLayers.Feature.Vector>)}