public static function normalize($rawtags, $tolowercase = true) {
        $result = array();
        foreach ($rawtags as $rawtag) {
            $rawtag = trim($rawtag);
            if (strval($rawtag) !== '') {
                $clean = clean_param($rawtag, PARAM_TAG);
                if ($tolowercase) {
                    $result[$rawtag] = core_text::strtolower($clean);
                } else {
                    $result[$rawtag] = $clean;
                }
            }
        }
        return $result;
    }
public static function normalize($rawtags, $tolowercase = true) {
        $result = array();
        foreach ($rawtags as $rawtag) {
            $rawtag = trim($rawtag);
            if (strval($rawtag) !== '') {
                $clean = clean_param($rawtag, PARAM_TAG);
                if ($tolowercase) {
                    $result[$rawtag] = core_text::strtolower($clean);
                } else {
                    $result[$rawtag] = $clean;
                }
            }
        }
        return $result;
    }
public static function normalize ( $ rawtags , $ tolowercase = true ) { $ result = array ( ) ; foreach ( $ rawtags as $ rawtag ) { $ rawtag = trim ( $ rawtag ) ; if ( strval ( $ rawtag ) !== '' ) { $ clean = clean_param ( $ rawtag , PARAM_TAG ) ; if ( $ tolowercase ) { $ result [ $ rawtag ] = core_text :: strtolower ( $ clean ) ; } else { $ result [ $ rawtag ] = $ clean ; } } } return $ result ; }
Function that normalizes a list of tag names.

@param   array        $rawtags array of tags
@param   bool         $tolowercase convert to lower case?
@return  array        lowercased normalized tags, indexed by the normalized tag, in the same order as the original array.
(Eg: 'Banana' => 'banana').
Function that normalizes a list of tag names .