wildcard_sort() public static method

Useful because we are only interested in the wildcard, and not sorting of other values.
public static wildcard_sort ( $field, $direction = "ASC" )
 function getRate($address = null)
 {
     if (!$address) {
         $address = singleton('Address');
     }
     $where = array("\"TaxRate\".\"TaxClassID\" = {$this->ID}", RegionRestriction::address_filter($address));
     $sort = implode(', ', array(RegionRestriction::wildcard_sort("PostalCode"), RegionRestriction::wildcard_sort("City"), RegionRestriction::wildcard_sort("State"), RegionRestriction::wildcard_sort("Country"), "\"Rate\" ASC"));
     if ($rate = DataObject::get_one("TaxRate", "(" . implode(") AND (", $where) . ")", true, $sort)) {
         return $rate->Rate;
     }
     return 0;
 }