public static function clean($input, $type)
    {
        if (!empty($input)) {
            if (!empty($type)) {
                if ($type === 'secured') {
                    return stripslashes(trim(htmlentities($input, ENT_QUOTES | ENT_HTML5, 'UTF-8')));
                } elseif ($type === 'root') {
                    return stripslashes(trim(htmlentities(htmlspecialchars(strip_tags($input), ENT_QUOTES | ENT_HTML5, 'UTF-8'), ENT_QUOTES | ENT_HTML5, 'UTF-8')));
                }
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
public static function clean($input, $type)
    {
        if (!empty($input)) {
            if (!empty($type)) {
                if ($type === 'secured') {
                    return stripslashes(trim(htmlentities($input, ENT_QUOTES | ENT_HTML5, 'UTF-8')));
                } elseif ($type === 'root') {
                    return stripslashes(trim(htmlentities(htmlspecialchars(strip_tags($input), ENT_QUOTES | ENT_HTML5, 'UTF-8'), ENT_QUOTES | ENT_HTML5, 'UTF-8')));
                }
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
public static function clean ( $ input , $ type ) { if ( ! empty ( $ input ) ) { if ( ! empty ( $ type ) ) { if ( $ type === 'secured' ) { return stripslashes ( trim ( htmlentities ( $ input , ENT_QUOTES | ENT_HTML5 , 'UTF-8' ) ) ) ; } elseif ( $ type === 'root' ) { return stripslashes ( trim ( htmlentities ( htmlspecialchars ( strip_tags ( $ input ) , ENT_QUOTES | ENT_HTML5 , 'UTF-8' ) , ENT_QUOTES | ENT_HTML5 , 'UTF-8' ) ) ) ; } } else { return false ; } } else { return false ; } }
Clean input.

@param (string) $input string
@param (string) $type  secured,root

@since 1.0.0

@return mixed
Clean input .