, ]] * @return mixed Filtered value, or FALSE if invalid */ public static function filter($attrValue, array $map) { foreach ($map as $pair) { if (preg_match($pair[0], $attrValue)) { return $pair[1]; } } return $attrValue; } }