protected function normalizeFlag($flag) { $flag = strtoupper($flag); $flag = str_replace('\\', '', $flag); return trim($flag); }