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;
    }
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;
    }
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 ; }
Cleans up a file name for use as a namespace
@param $ns
@return mixed
Cleans up a file name for use as a namespace