code: function(attrName, attrValue) {
          var i,
              feature,    
              len = this.features.length,
              foundFeatures = [];
          for(i = 0; i < len; i++) {            
              feature = this.features[i];
              if(feature && feature.attributes) {
                  if (feature.attributes[attrName] === attrValue) {
                      foundFeatures.push(feature);
                  }
              }
          }
          return foundFeatures;
      }
docs: APIMethod: getFeaturesByAttribute
  Returns an array of features that have the given attribute key set to the
  given value. Comparison of attribute values takes care of datatypes, e.g.
  the string '1234' is not equal to the number 1234.
  
  Parameters:
  attrName - {String}
  attrValue - {Mixed}
  
  Returns:
  Array({<OpenLayers.Feature.Vector>}) An array of features that have the
  passed named attribute set to the given value.