protected function sanitize($varValue, $sanitizations)
    {
        if (is_array($sanitizations)) {
            foreach ($sanitizations as $value) {
                try {
                    if (is_string($value)) {
                        switch ($value) {
                            case "trim":
                                $varValue = trim($varValue);

                                break;
                            case "clear":
                                $varValue = "";

                                break;
                        }
                    } elseif (is_callable($value)) {
                        $varValue = $value($varValue);
                    }
                } catch (\Exception $ex) {
                    //*** Sanitisation failed. Continue silently.
                }
            }
        }

        return $varValue;
    }