public function clean($mixed, $stripTags = true, $htmlEntities = true)
    {
        if (is_array($mixed)) {
            foreach ($mixed as $key => $value) {
                $mixed[$key] = self::clean($value, $stripTags, $htmlEntities);
            }

        } else {
            if ($stripTags === true) {
                $mixed = strip_tags($mixed);
            }

            if ($htmlEntities === true) {
                $mixed = htmlentities($mixed);
            }
        }

        return $mixed;
    }