public function sanitizeNamespace($ns)
    {
        // dots to underscores
        $ns = str_replace(".", "_", $ns);

        // spaces to underscores
        $ns = str_replace(" ", "_", $ns);

        // dashes to underscores
        $ns = str_replace("-", "_", $ns);

        // Alpha numeric
        $ns = preg_replace("/[^A-Za-z0-9\.\_\- ]/", '', $ns);

        return $ns;
    }